Vinfast Battery-lease Policy
Xem dạng PDFVinfast has battery-lease policy. A battery for a car cost N VND. Customer could rent battery at a cost of X VND per month. When a battery capacity drops below 70%, Vinfast will recall and replace the battery with a new one. The recalled battery is used to store electricity. Vinfast estimates that after T months, they have to recall battery, at the time of recall, the battery has a value of M VND. Suppose the interest rate a bank offer is r% per month for Vinfast to buy battery. Your task is to write a program to calculate the minimum X so that Vinfast can at least make a profit (no loss).
Input
The only line contains 3 integers N, M, T and a real number r (0 < N, M < 10^9, 0 < T ≤ 240, 0 < r ≤ 15).
Output
Print out minimum X (rounded to the nearest integer).
Example
Input
120000000 0 120 1
Output
1721651
Input
178000000 50000000 72 1
Output
3002425
Bình luận