#include #include using namespace std; int main() { int N; cin >> N; vector fibonacci{ 1, 1, 2 }; for (int i = 3; i < N + 1; ++i) { for (size_t j = 0; j < 2; ++j) fibonacci.at(j) = fibonacci.at(j + 1); fibonacci.at(2) = fibonacci.at(0) + fibonacci.at(1); } if (N == 1) cout << fibonacci.at(1); else cout << fibonacci.at(2); }