eolymp
bolt
Try our new interface for solving problems
Problems

Fibonacci Numbers

Fibonacci Numbers

The Fibonacci sequence is the sequence of numbers such that every element is equal to the sum of the two previous elements, except for the first two elements \textbf{F_0} and \textbf{F_1} which are respectively zero and one. \includegraphics{https://static.e-olymp.com/content/4d/4d75dfbaa5be887a1537805fdbfec9f28986dab9.jpg} What is the numerical value of the nth Fibonacci number? For each test case, a line will contain an integer i between \textbf{0} and \textbf{10^8} inclusively, for which you must compute the ith Fibonacci number \textbf{F_i}. Fibonacci numbers get large pretty quickly, so whenever the answer has more than \textbf{8} digits, output only the first and last \textbf{4} digits of the answer, separating the two parts with an ellipsis ("..."). There is no special way to denote the end of the of the input, simply stop when the standard input terminates (after the EOF).
Time limit 1 second
Memory limit 64 MiB
Input example #1
0
1
2
3
4
5
35
36
64
65
Output example #1
0
1
1
2
3
5
9227465
14930352
1061...7723
1716...7565