#include <iostream>
using namespace std;
int main(){
    int n;
    while(cin>>n){
        int p,q=0,r=1;
        while (n--){
            p=q;
            q=r;
            r=p+q;
        }
        cout<<r<<endl;
    }
    return 0;
}