#include <iostream>
#include <algorithm>
using namespace std;

//例题8.3斐波那契数列
int f(int x){
    if(x==0||x==1)return x;
    return f(x-1)+f(x-2);
}

int main(){
    int x;
    cin>>x;
    cout<<f(x)<<endl;
    return 0;
}