#include <iostream>
using namespace std;

int getSum(int n);

int main() {

    int n;
    cin >> n;

    cout << getSum(n) << endl;

    return 0;
}

int getSum(int n) {

    // write your code here......
    if(n<=2){
        return 1;
    }
    else{
        int a=1,b=1;
        int sum=2;
        for(int i=3;i<=n;i++){
            sum=a+b;
            b=a;
            a=sum;
        }
        return sum;
    }

}