#include<iostream>
#include<cstring>
#include<algorithm>
using namespace std;
const int N=30;
int a[N];
int main(){
int n;
a[0]=1,a[1]=1,a[2]=2;
while(cin>>n){
for(int i=3;i<=n;i++) a[i]=a[i-1]+a[i-2];
cout<<a[n]<<endl;
}
return 0;
}