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

int main(int argc, char* argv[]){
    int n;
    cin >> n;

    if(n == 1 || n == 2){
        cout << 1 << endl;
        return 0;
    }

    int last1 = 1;
    int last2 = 1;
    int curr;
    for(int i = 3; i <= n; ++i){
        curr = last1 + last2;
        last1 = last2;
        last2 = curr;
    }
    cout << curr << endl;


    return 0;
}