#include <iostream>
#include <cmath>
using namespace std;
int main(int argc, char** argv)
{
int n;
int f[45];
while(cin>> n)
{
f[0]=1;
f[1]=2;
for (int i=2;i<=n-1;i++)
{
f[i]=f[i-1]+f[i-2];
}
cout << f[n-1] << endl;
}
return 0;
}