Canadian Computing Competition: 1998 Stage 2, Day 1, Problem 1
The th Fibonacci number,
, is defined thus:
Write a program that reads several , one per line, and writes the corresponding
, one per line. Each value of
will be between
and
. The last line of input contains
0
.
Sample Input
1
2
3
4
5
100
0
Sample Output
1
1
2
3
5
354224848179261915075
Comments