#include #include #include #include #include #include #define MAX 256 #define D 100000000 using namespace std; struct BigInteger { int w; vector d; BigInteger() : w(0) {} BigInteger(int x) : w(1), d(1, x) {} void Output() const { if (!w) { printf("0\n"); return; } printf("%d", d[w - 1]); for (int i = w - 2; ~i; --i) { printf("%08d", d[i]); } printf("\n"); } BigInteger& operator +=(const BigInteger& o) { if (w < o.w) { for (int i = w; i < o.w; ++i) d.push_back(0); w = o.w; } int x = 0; for (int i = 0; i < o.w; ++i) { d[i] += o.d[i] + x; if (d[i] >= D) { d[i] -= D; x = 1; } else { x = 0; } } for (int i = o.w; i < w; ++i) { d[i] += x; if (d[i] >= D) { d[i] -= D; x = 1; } else { x = 0; } } if (x) { d.push_back(1); ++w; } return *this; } BigInteger operator +(const BigInteger& o) const { BigInteger ret = *this; ret += o; return ret; } } dp[MAX]; void Init() { dp[0] = 1; dp[1] = 1; for (int i = 2; i < MAX; ++i) { dp[i] = 1; for (int j = 0; j < i - 1; ++j) { dp[i] += dp[j]; } } } int main() { Init(); int n; while (~scanf("%d", &n)) { dp[n].Output(); } return 0; }