Ice Cream
Time limit2sMemory limit1024 MB
Find the minimum cost of a tower at least S cm tall, where the base costs 250 yen and gives A cm and each extra layer costs 100 yen and adds B cm.
- Level
Easy1 of 10
- Topics
- Math, Implementation, Brute force
- Solved
- No attempts yet
Problem
The JOI ice cream shop is famous for its ice cream towers, which can be stacked very high. An ice cream tower consists of a base ice cream with 0 or more additional ice creams stacked on top of it.
The base ice cream costs 250 yen and is A cm tall. Each additional ice cream costs 100 yen, and adding one increases the height of the ice cream tower by B cm.
You want to buy an ice cream tower that is at least S cm tall at this shop. Find the minimum amount of money needed to buy an ice cream tower that is at least S cm tall.
Input
The input is given from standard input in the following format.
S
A
B
Output
Print the minimum amount of money needed to buy an ice cream tower that is at least S cm tall, omitting the unit (yen).
Constraints
1 ≦ S ≦ 100.1 ≦ A ≦ 100.1 ≦ B ≦ 100.- All input values are integers.