package yukicoder; import java.util.Scanner; public class N44 { private int n; public long c; public long[][] dp; public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); N44 hoge = new N44(n); long i = hoge.solve(0, 0); System.out.println(i); } N44(int n){ this.n = n; this.dp = new long[n][10000]; for(int i = 0;i < n;++i){ for(int j = 0;j < 10000;++j){ dp[i][j] = -1; } } } public long solve(int step, int count){ long a, b; if(step + 1 == n){ return count + 1; }else if(step + 2 == n){ return count + 2; }else if(step >= n){ return 0; } if(dp[step + 1][count] != -1){ a = dp[step + 1][count]; }else{ a = solve(step + 1, count); dp[step + 1][count] = a; } if(dp[step + 2][count] != -1){ b = dp[step + 2][count]; }else{ b = solve(step + 2, count); dp[step + 2][count] = b; } return a + b; } }