#t302. 昆虫繁殖(insect)

昆虫繁殖(insect)

Insect Reproduction

Problem Background

Special for beginners, ^_^

Problem Description

Scientists discovered a special kind of insect in a tropical forest; this insect reproduces very strongly. Every pair of eggs takes two months to grow into adults. After becoming adults, they need xx months before they can reproduce, and then they lay yy pairs of eggs each month. Assume no adult ever dies; in the first month there is only one pair of adults, and the first month after eggs grow into adults they do not lay eggs (they start laying after xx months). After ZZ months, how many pairs of adults are there in total? 1≤X≤201 \le X \le 20, 1≤Y≤201 \le Y \le 20, X≤Z≤50X \le Z \le 50.

Input Format

The values x,y,zx, y, z.

Output Format

The number of pairs of adults after ZZ months.

Sample Input 1

1 2 8

Sample Output 1

37

Constraints

1s, 1024KiB for each test case.