Module: WORKSHOP - 1 "SOFIA THE FIRST". LINEAR ALGORITHMS


Problem

11 /11


*Mortgages for Butler

Theory Click to read/hide

This task is recommended to be performed at home. 
To perform it, you need to find the appropriate formulas on the Internet.

Problem

Butler decided to buy an apartment. To buy an apartment, he needs to get a mortgage. He knows that he needs a loan the size of R coins. Butler wants to determine the overpayment at a known interest rate P% per year and the period of  M months for which a mortgage is taken. Payment is made monthly. Mortgage payments - annuity.

Input format
Given three numbers, each from a new line - loan size - integer R (0 < R < 5·106), annual interest rate - real numbe P (0 < P < 15) and crediting period (in months) - integer M (0 < M <300).

Output format
Output a one number - the amount of overpayment by the end of the loan term.
 
Example
N Input Output
1 5000
5
12
136.45