1843: 【CSP函数递归】统计每个月兔子的总数▅

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:3 Solved:3

Description

有一对兔子,从出生后第 lns="http://www.w3.org/1998/Math/MathML">3 个月起每个月都生一对兔子,一对小兔子长到第三个月后每个月又生一对兔子,假如兔子都不死。

问第 lns="http://www.w3.org/1998/Math/MathML">n 个月( lns="http://www.w3.org/1998/Math/MathML">n≤30 )的兔子总数为多少对?

Input

输入 lns="http://www.w3.org/1998/Math/MathML">1 个整数 lns="http://www.w3.org/1998/Math/MathML">n ,表示第几个月。

Output

 lns="http://www.w3.org/1998/Math/MathML">n 个月兔子的总数量有多少对?

Sample Input Copy

9

Sample Output Copy

34