Deposit "Anti-crisis"
Permanent clients of a very large bank (VLB) have recently been offered the opportunity to open a new account called «Anti-Crisis». This account features a complex interest calculation scheme, and as the sole employee of the bank's IT department, you are tasked with developing a program to compute the account balance with accrued interest.
The «Anti-Crisis» account can be opened for any term, but the account's end date must be no later than December 31, 2009. The interest rate on the account is p percent per annum. This means that if at the start of a certain period of d days, during which the account balance remains unchanged, the balance was x hryvnias, then at the end of this period it will be x·(1+(p/100)·(d/365)).
Interest is accrued monthly on the last day of the month (or on the last day of the account's term), and this interest is added to the account balance. For example, if on May 1 the account balance was x hryvnias, then on May 31, x·(p/100)·(31/365) hryvnias will be added to the account, and on June 1, the balance will be x·(1+(p/100)·(31/365)). In June, interest will be calculated on this new amount.
If the account's last day was May 20, then on that day, x·(p/100)·(20/365) hryvnias will be added to the account, and the balance that the client will receive will be x·(1+(p/100)·(20/365)). Similar calculations apply if the account was opened not on the first day of the month. For instance, if the account was opened on February 18, then on February 28, x·(p/100)·(11/365) hryvnias will be added to the balance, and if it was opened on February 28, then on that same day, x·(p/100)·(1/365) hryvnias will be added.
Your task is to write a program that, given the account opening date and its term, calculates what the account balance will be at the end of the term, starting with an initial amount of x hryvnias.
Input
The first line of the input file contains three integers: the initial account balance x, the interest rate p, and the account duration d (1 ≤ x ≤ 100000, 1 ≤ p ≤ 200, 1 ≤ d ≤ 365). The second line of the input file contains the account opening date in the format «day-month-year». The day and month are represented by numbers, with leading zeros for numbers less than ten. It is guaranteed that the account is opened in 2009, and its end date is also in 2009.
Output
Output the final account balance with a precision of 6 decimal places.