Setting

The Fibonacci sequence is an integer sequence defined by the following recurrence relation for each element Fn :

F0 = 0
F1 = 1
Fn = Fn-1+Fn-2

Input

Each line of input will contain a number i between 0 and 50. Input is terminated by end of file.

Output

For each line of input put out a line of output containing the i'th fibonacci number.

Sample Input

1
3
7
20

Sample Output

1
2
13
6765

Upload Solution

Please log in to submit your solution.

Statistics

Difficulty (6 votes)
Average test runtime 0.30
Points (changes over time) 10
Tried by 37 users
Solved by 37 users

Global ranking

# Name Runtime Points worth
1 Brian 0.12 19
2 贝尔恩德 0.13 17
3 ,s/java/NaN/gi 0.14 16
4 Mac 0.14 16
5 Justin 0.15 15
6 Dark 0.15 15
7 Pascal 0.15 15
8 Daniel 0.15 15
9 Nis 0.16 14
10 Irfan 0.16 14
11 mad 0.18 12
12 Maria-Anna 0.19 12
13 Ali 0.19 12
14 JB 0.19 12
15 Chris Danger 0.20 11
16 Melf 0.20 11
17 Skillbo Boblin 0.20 11
18 Kristof 0.21 11
19 Phatti McButterpants 0.24 9
20 Marek 0.24 9
21 mascent 0.24 9
22 Ohreally 0.27 8
23 Finn-Lasse 0.29 8
24 Tim 0.30 7
25 The Dude 0.30 7
26 Thomas 0.32 7
27 Soeren 0.32 7
28 AlexanderP 0.35 6
29 Eren B. Yilmaz 0.36 6
30 Birger 0.36 6
31 Jan 0.36 6
32 Philip 0.38 6
33 IeM 0.39 6
34 Anne 0.41 5
35 Florian 0.41 5
36 VargK 1.28 2
37 Sloner 1.37 2