import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
static Long[][] dp;
static long recur(int N, int M) {
if (dp[N][M] == null) {
dp[N][0] = recur(N-1, 0) + recur(N-1, 1);
dp[N][1] = recur(N-1, 0);
}
return dp[N][M];
}
public static void main(String[] args) throws IOException {
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
int N = Integer.parseInt(bf.readLine());
dp = new Long[91][2];
dp[1][0] = 0l;
dp[1][1] = 1l;
long result = recur(N, 0) + recur(N, 1);
System.out.print(result);
}
}
DP문제인거 인지
점화식 구현
dp[N][0] = recur(N-1, 0) + recur(N-1, 1);
dp[N][1] = recur(N-1, 0);