# include # include # include int main() { int N, i, j; //零位存长度 int fb[201][50] = {0}; int next; fb[0][1] = 1; fb[1][1] = 2; fb[0][0] = fb[1][0] = 1; for(int i = 2; i < 201; i++){ next = 0; for(j = 1; j < 50; j++){ if(j > fb[i-1][0] && j > fb[i-2][0]) { break; } else if(j <= fb[i-1][0] && j > fb[i-2][0]) { fb[i][j] = fb[i-1][j] + next; next = 0; } else{ fb[i][j] = fb[i-1][j] + fb[i-2][j] + next; if(fb[i][j] > 9) { fb[i][j] = fb[i][j] - 10; next = 1; }else next = 0; } } if(next){ fb[i][j] = next; fb[i][0] = j; }else fb[i][0] = j-1; } while(scanf("%d", &N) != EOF){ for(i = fb[N-1][0]; i >= 1; i--){ printf("%d", fb[N-1][i]); } printf("\n"); } return 0; }