#include #include int_least64_t search(int n, std::vector& cache) { if (n == 0) return 1; if (n == 1) return 1; int_least64_t ret = cache[n - 1]; if (ret >= 0) return ret; ret = search(n - 2, cache) + search(n - 1, cache); cache[n - 1] = ret; return ret; } int main() { int n; std::cin >> n; std::vector cache(n, -1); int_least64_t result = search(n, cache); std::cout << result << std::endl; return 0; }