#include int calc_fib(int n) { if (n <= 1) return n; return calc_fib(n - 1) + calc_fib(n - 2); } int fib(int n) { int a, b, c, i; if (n <= 1) return n; a = 0; b = 1; for(i = 1; i < n; i++) { c = a + b; a = b; b = c; } return b; } int main() { int n = 0; std::cin >> n; std::cout << fib(n) << '\n'; return 0; }