eolymp
bolt
Try our new interface for solving problems
Problems

How to Make Money

How to Make Money

Time limit 1 second
Memory limit 64 MiB

Today Vasya found a great way to earn money. He offers his diary to Pete for p rubles a day. There are days when Peter is not quite successfully wrote a particular control, the results of which, of course, recorded in his diary. And in order not to upset his family, he rents a diary Vasya. Vasya learnt the basics of the economy, so to attract the customers he says that every m-th day of rental costs completely free.

Peter rented a diary for n days. Now Vasya is trying to figure out how many rubles it will receive as a result of this transaction.

Input data

Three positive integers n, m and p (n, m, p < 10001).

Output data

Print Vasya's profit.

Examples

Input example #1
15 10 2
Output example #1
28