Sponsor’s money
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
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. S ≤ 1000, 0 < N ≤ 1000, B ≤ 10^300.
Output
One number is the sum which remains in scoring of sponsor or that sum which he want to take in debt.
Examples
Input #1
Answer #1
Submissions 1K
Acceptance rate 31%