#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long LL; typedef pair PII; typedef vector VI; typedef vector VPII; typedef pair PLL; typedef pair PIL; typedef pair PLI; typedef double DB; #define pb push_back #define mset(a, b) memset(a, b, sizeof a) #define all(x) (x).begin(), (x).end() #define bit(x) (1 << (x)) #define bitl(x) (1LL << (x)) #define sqr(x) ((x) * (x)) #define sz(x) ((int)(x.size())) #define cnti(x) (__builtin_popcount(x)) #define cntl(x) (__builtin_popcountll(x)) #define clzi(x) (__builtin_clz(x)) #define clzl(x) (__builtin_clzll(x)) #define ctzi(x) (__builtin_ctz(x)) #define ctzl(x) (__builtin_ctzll(x)) #define X first #define Y second #define Error(x) cout << #x << " = " << x << endl template inline void chkmax(T& x, U y) { if (x < y) x = y; } template inline void chkmin(T& x, U y) { if (y < x) x = y; } const int MN = 205; struct BG { int a[100], n; void init() { memset(a, 0, sizeof a); n = 1; } void output() { for (int i = n - 1; i >= 0; i--) printf("%d", a[i]); puts(""); } } f[MN]; BG add(BG A, BG B) { BG C; C.init(); C.n = max(A.n, B.n) + 2; for (int i = 0; i < C.n; i++) { C.a[i] = A.a[i] + B.a[i]; } for (int i = 0; i < C.n - 1; i++) { C.a[i + 1] += C.a[i] / 10; C.a[i] %= 10; } while (C.a[C.n - 1] == 0 && C.n > 1) C.n--; return C; } int main() { f[1].init(); f[1].a[0] = 1; f[2].init(); f[2].a[0] = 2; for (int i = 3; i < MN; i++) { f[i] = add(f[i - 1], f[i - 2]); } int n; while (scanf("%d", &n) == 1) { f[n].output(); } return 0; }