Time

12:32:52
23 May 2012
Version for print

Sponsor’s money

   Prize’s Fund of sponsor "I will give you more money than 2 preceding sponsors together" said new sponsor after 2 tournaments in which sponsor spent in S UAN for every tournament. The words like it said every next sponsor.

   You know a sum S, which give first sponsor, a number of regular tournament N and a sum of scoring in bank what have a sponsor, or that sum which he want to take in debt for prizes.


Specifications

   Input

   In the first line we have 3 numbers S, N, B. S1000, 0 < N1000, B10300.

   Output

   One number is the sum which remains in scoring of sponsor or that sum which he want to take in debt.


Problem information

Time Limit: 1 seconds
Memory Limit: 64 MB
Balls for the passed test: 5
Complexity: 34% 61/93

Example

Example input

3 4 20

Example output

9


← Firs conversation Problems Pipeline (RU) →