Quantity of White Mice

No attempts yetTime limit1sMemory limit128 MB

Problem

A laboratory keeps one species of white mouse. Each mouse lives only nn months after birth (9<n<139 < n < 13, nn is a natural number). Age counts the month of birth as month 1, so a mouse born in January is in its fourth month in April.

The mice start giving birth in month 7. In months 7 and 8, every pair of parent mice gives birth to one pair of mice per month. Starting in month 9 and lasting mm months (0<m<30 < m < 3, mm is a natural number), every pair of parent mice gives birth to two pairs of mice per month. After that they give birth no more and live out the rest of their life. A mouse dies at the beginning of its month n+1n+1 and is taken out of the lab right away. Month n+1n+1 does not count as time alive.

A month runs in this order.

  1. Every mouse that reaches month n+1n+1 dies and leaves the lab.
  2. Count how many pairs survived from the previous month.
  3. The mice that are due to give birth this month give birth. If the count from step 2 is at most 100 pairs, every pair born this month stays in the lab. If it is more than 100 pairs, every pair born this month goes to another laboratory. Pairs that leave are not part of this lab's count and never give birth here.

At the start the lab holds one newborn pair, and month 1 of that pair is month 1 overall. Find how many pairs of mice are in this lab in month kk (0<k<370 < k < 37, kk is a natural number).

Input

Each line holds one group of data: three natural numbers nn, mm, kk separated by commas. A line holding -1 comes after all the groups and marks the end of the input.

Output

Print one line for each group. The line starts with the input data copied back, then a colon and a space, then the computed number of pairs of white mice.