import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
if(N==0) {
System.out.print(0);
return;
}
long zero = 1;
long one = 0;
long temp = 0;
for(int i = 1 ; i <N-1 ; i++) {
temp = one;
one = zero;
zero = zero+temp;
}
System.out.print(one+zero);
}
}