#include<iostream>
#include<iomanip>
#include<cstring>
using namespace std;
int n,f[5010][5010]={0};
int main()
{
cin>>n;
f[1][1]=1;
f[2][1]=2;
int i=1;
for(int k=3;k<=n;k++){
i=1;
while(f[k-1][i]>0||f[k-2][i]>0){
f[k][i]+=f[k-1][i]+f[k-2][i];
if(f[k][i]>=10){
f[k][i+1]+=f[k][i]/10;
f[k][i]=f[k][i]%10;
}
i++;
}
}
while(f[n][i]==0) i--;
for(;i>=1;i--) cout<<f[n][i];
return 0;
}