# 目次
# 解答
int fib(vector<int> &dp, int n) {
if (n == 0 || n == 1) {
return dp[n] = 1;
}
if (dp[n] > 0) return dp[n];
return dp[n] = fib(dp, n - 1) + fib(dp, n - 2);
}
int main(void){
int n;
cin >> n;
vector<int> dp(n+1);
cout << fib(dp, n) << endl;
}