#include <bits/stdc++.h>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
long long f(int x){
if(x==1) return 1;
if(x==2) return 2;
else return(f(x-1)+f(x-2));
}
int main(int argc, char** argv) {
int N;
while(cin>>N)
cout<<f(N)<<endl;
return 0;
}