rt
#include<bits/stdc++.h>
using namespace std;
int dp[5005][505],n;
void jia(int z,int x,int y){
int i=1,jin=0;
while(i<=dp[x][0]||i<=dp[y][0]){
dp[z][i]=dp[x][i]+dp[y][i]+jin;
jin=dp[z][i]/10;
dp[z][i]=dp[z][i]%10;
i++;
}
dp[z][i]=dp[z][i]+jin;
while(dp[z][i]==0&&i>1) i--;
dp[z][0]=i;
}
void print(int x){
for(int i=dp[x][0];i>=1;i--) cout<<dp[x][i];
}
int main(){
dp[1][1]=1;dp[1][0]=1;dp[2][1]=2;dp[2][0]=1;
cin>>n;
for(int i=3;i<=n;i++){
jia(i,i-1,i-2);
}
print(n);
}