1138: 昆虫繁殖问题

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

Description

科学家在热带森林中发现了一种特殊的昆虫,这种昆虫的繁殖能力很强。每对成虫过x个月产y对卵,每对卵要过两个月长成成虫。假设每个成虫不死,第一个月只有一对成虫,且卵长成成虫后的第一个月不产卵(过X个月产卵),问过Z个月以后,共有成虫多少对?
0≤x≤20, 1≤y≤20, x≤z≤50。

Input

x,y,z的数值。

Output

过z个月以后,共有成虫对数

Sample Input Copy

1 2 8

Sample Output Copy

37