#include<bits/stdc++.h>
using namespace std;
const int N=1005;
struct bign{
int len,d[N];
bign(){len=1; memset(d,0,sizeof(d));}
bign(int x){
memset(d,0,sizeof(d));
for (len=0;x;x/=10)
d[len++]=x%10;
if (len==0) len=1;
}
string str(){
string s;
for (int i=len-1;i>=0;i--)
s+=(char)('0'+d[i]);
return s;
}
bign operator +(bign b){
bign c;
c.len=max(len,b.len);
for (int i=0;i<c.len;i++){
c.d[i]+=d[i]+b.d[i];
c.d[i+1]+=c.d[i]/10;
c.d[i]%=10;
}
if (c.d[c.len]>0) c.len++;
return c;
}
friend ostream& operator <<(ostream &output,bign x){
output<<x.str();
return output;
}
};
int main(){
int n;
bign f[5005];
f[1]=1;
f[2]=2;
for (int i=3;i<=n;i++)
f[i]=f[i-1]+f[i-2];
cin>>n;
cout<<f[n];
return 0;
}