#38184: 不能一直遞迴會超時


11131039@stu.tshs.tp.edu.tw (林孟希)


#include <bits/stdc++.h>
using namespace std;


int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    long long n; cin>>n;
    long long table[3]={0,1,1};
    for(int i=2;i<n;i++)
    {
        table[2]=table[0]+table[1];
        table[0]=table[1];
        table[1]=table[2];
    }
    cout<<table[2];
}