import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long n = sc.nextInt(); long[] dp = new long[3]; dp[0] = 1; dp[1] = 1; int i; for (i = 2; i != n + 1; i++) { dp[i % 3] = dp[(i + 1) % 3] + dp[(i + 2) % 3]; } System.out.println(dp[(i - 1) % 3]); sc.close(); } }