import java.math.BigInteger;
import java.util.Scanner;
class Main{
public static void main(String[] args) {
BigInteger b1 = new BigInteger("1");
BigInteger b2 = new BigInteger("1");
BigInteger b3 = new BigInteger("2");
int N;
Scanner in = new Scanner(System.in);
N = in.nextInt();
if(N == 1)
System.out.println(1);
else if (N == 0)
System.out.println(0);
else if(N == 2)
System.out.println(2);
else if(N == 3)
System.out.println(3);
else{
for(int i = 1; i < N; i++){
b3 = b1.add(b2);
b1 = b2;
b2 = b3;
}
System.out.println(b3);
}
}
}
注意N=0时的情况