// // main.cpp // B // // Created by 黄宇凡 on 16/5/14. // Copyright © 2016年 黄宇凡. All rights reserved. // #include #include #include #include using namespace std; const int maxn = 205; struct bignum{ string x; int d[55]; int len; bignum(){ memset(d,0,sizeof(d)); len = 0; } void read(){ cin >> x; len = (int)x.length(); for(int i = 0;i < len;i++){ d[i] = x[len - 1 - i] - '0'; } } bool operator < (const bignum& rhs)const{ if(len < rhs.len) return true; for(int i = len - 1;i >= 0;i--){ if(d[i] < rhs.d[i]) return true; else if(d[i] > rhs.d[i]) return false; } return false; } bignum operator + (const bignum & rhs) const{ int l = max(rhs.len,len); bignum x; for(int i = 0;i < l;i++){ x.d[i] += (d[i] + rhs.d[i]); x.d[i + 1] += x.d[i] / 10; x.d[i] = x.d[i] % 10; } if(x.d[l] > 0) x.len = l + 1; else x.len = l; return x; } void print(){ for(int i = len - 1;i >= 0;i--){ printf("%d",d[i]); } puts(""); } }a[maxn]; int main(int argc, const char * argv[]) { a[0].len = 1; a[0].d[0] = 1; a[1].len = 1; a[1].d[0] = 1; for(int i = 2;i <= 200;i++){ a[i] = a[i - 1] + a[i - 2]; } int n; while(scanf("%d",&n) != EOF){ a[n].print(); } return 0; }