#include
#include
#include
using namespace std;
const int INF=5000;
string p[INF];
string sum(string s1,string s2)
{
if(s1.length()=0;i--,j--)
{
s1[i]=char(s1[i]+(j>=0?s2[j]-'0':0));
if(s1[i]-'0'>=10)
{
s1[i]=char((s1[i]-'0')%10+'0');
if(i) s1[i-1]++;
else s1='1'+s1;
}
}
return s1;
}
int main()
{
int n;
cin>>n;
p[0]="0"; p[1]="1";
for(int i=2;i<=n;i++)
p[i]=sum(p[i-1],p[i-2]);
cout<