var int n;
var int i;
var int current;
var int previous;
current := 1;

read(n);
i := 0;

while i < n do
    var int next;
    next := current + previous;
    previous := current;
    current := next;
    i := i+1;
od;

print(current);
