import java.util.Scanner;
public class P2193 {
public static void main(String[] args) { // DP 피보나치
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
long dp[] = new long[n + 1]; // 오버플로우 주의
if(n == 1 || n == 2) {
System.out.println(1);
return ;
}
dp[1] = dp[2] = 1;
for(int i = 3; i <= n; i++) {
dp[i] = dp[i-1] + dp[i-2];
}
System.out.println(dp[n]);
sc.close();
}
/* DFS 접근 시간초과
private static int cnt = 0;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt(), dp[] = new int[n];
dp[0] = 1;
dfs(dp, 1, 1);
System.out.println(cnt);
sc.close();
}
private static void dfs(int[] dp, int index, int prev) {
if (index == dp.length) {
cnt++;
return;
}
if (prev == 1) {
dp[index] = 0;
dfs(dp, index + 1, dp[index]);
} else {
dp[index] = 0;
dfs(dp, index + 1, dp[index]);
dp[index] = 1;
dfs(dp, index + 1, dp[index]);
}
}
*/
}