#include<iostream>
using namespace std;
int main()
{
long long x,a=1,b=2,c;
cin>>x;
for(int i=3;i<=x;i++)
{
c=a+b;
a=b;
b=c;
}
cout<<c<<endl;
return 0;
}
#include<iostream>
using namespace std;
int main()
{
long long x,a=1,b=2,c;
cin>>x;
for(int i=3;i<=x;i++)
{
c=a+b;
a=b;
b=c;
}
cout<<c<<endl;
return 0;
}