e-olymp
favorite We need a little bit of your help to keep things running, click on this banner to learn more
Problems

Sponsor’s money

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.

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.

Time limit 1 second
Memory limit 64 MiB
Input example #1
3 4 20
Output example #1
9
Author Анатолий Присяжнюк