#include <iostream>
using namespace std;

int main() {
    int n, firstNo = 0, secondNo = 1, theNo = 1;
    cin >> n;
    while (n > 1) {
        theNo = firstNo + secondNo;
        firstNo = secondNo;
        secondNo = theNo;
        --n;
    }
    cout << theNo;
    return 0;
}