#include<stdio.h>
#include<stdlib.h>
#define LEN 5001
#define NUMLEN 1050
//http://using-c.blogspot.tw/2010/03/problem-495-fibonacci-freeze.html
struct FibNum
{
int num[NUMLEN];
int length;
};
struct FibNum Fibonacci[LEN];
int main(){
Fibonacci[0].num[0] = 0, Fibonacci[0].length = 0,
Fibonacci[1].num[0] = 1, Fibonacci[1].length = 0;
int i, j, k, n;
for (i = 2; i < LEN; i ++){
for (j = 0; j < NUMLEN; j ++){
Fibonacci[i].num[j] += Fibonacci[i - 1].num[j] + Fibonacci[i - 2].num[j];
if (Fibonacci[i].num[j] >= 10)
Fibonacci[i].num[j + 1] ++, Fibonacci[i].num[j] %= 10;
}
for (j = NUMLEN - 1; ; j--)
if (Fibonacci[i].num[j] > 0)
break;
Fibonacci[i].length = j ;
}
while (1){
if (scanf("%d", &n) < 1)
break;
printf("The Fibonacci number for %d is ", n);
for (i = Fibonacci[n].length ;i >= 0 ; i--)
printf("%d", Fibonacci[n].num[i]);
printf("\n");
}
return 0;
}