1176 菲波那契数


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 32M

Problem types
Allowed languages
C, C++, Java, Python

Description

菲波那契(fibonacci)数(简称菲氏数)定义为:

   f(0) = 0;

   f(1) = 1;

   f(n) = f(n-1) + f(n-2).     n>1的整数

如果写出菲氏数列,则应该是:

   0 1 1 2 3 5 8 13 21 34 ...

如果求其第6项,则应为8。

求第n项菲氏数。

Input

输入数据含有不多于50个的正整数n(0≤n≤46)。

Output

对于每个n,计算其第n项菲氏数,每个结果应占单独一行。

Sample

Input

6 10

Output

8
55

Source: qianneng


Comments

There are no comments at the moment.