#include <bits/stdc++.h>
using namespace std;
long long n;
int main()
{
freopen("xfibo.inp","r",stdin);
freopen("xfibo.out","w",stdout);
cin>>n;
double c5=sqrt(5);
cout<<fixed<<setprecision(0)<<((1/c5)*(pow((1+c5)/2,n)-pow((1-c5)/2,n)));
return 0;
}