#include #include #define MAX 210 #define MAXN 1000 using namespace std; int n, m, i, j, k, t; int main(){ int a; int num[MAX][MAXN] = { 0 }; num[0][0] = 1; num[1][0] = 1; int sum = 0; for (int i = 2; i < MAX; i++){ sum = 0; for (int j = 0; j < MAXN; j++){ int temp= num[i - 1][j] + num[i - 2][j]; num[i][j] += temp; sum = num[i][j] / 10; num[i][j] %= 10; num[i][j+1] += sum; } } while (scanf("%d", &n) != EOF){ int flag = 0; if (n != 0){ for (int i =MAXN-1; i >=0; i--){ if (num[n][i] == 0&&flag==0){ continue; } flag = 1; printf("%d", num[n][i]); } } printf("\n"); } return 0; }