#include <iostream>
using namespace std;
int fibonacci(int n) {
int f0 = 0, f1 = 1, fibo = 0;
for (int i = 0; i < n; i++) {
fibo = f0 + f1;
f0 = f1;
f1 = fibo;
}
return f0;
}
int main() {
int n;
cin >> n;
cout << fibonacci(n) << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IGZpYm9uYWNjaShpbnQgbikgewogICAgaW50IGYwID0gMCwgZjEgPSAxLCBmaWJvID0gMDsKCiAgICBmb3IgKGludCBpID0gMDsgaSA8IG47IGkrKykgewogICAgICAgIGZpYm8gPSBmMCArIGYxOwogICAgICAgIGYwID0gZjE7CiAgICAgICAgZjEgPSBmaWJvOwogICAgfQogICAgcmV0dXJuIGYwOwp9CgppbnQgbWFpbigpIHsKICAgIGludCBuOwogICAgY2luID4+IG47CiAgICBjb3V0IDw8IGZpYm9uYWNjaShuKSA8PCBlbmRsOwogICAgcmV0dXJuIDA7Cn0=