P26748 [AtCoder] Ice Cream
普及+
题目描述

Problem Description

The JOI Ice Cream Shop is famous for its very tall ice cream towers. An ice cream tower is made by stacking additional ice creams on top of a base ice cream, with zero or more additional ice creams.

The base ice cream costs 250 yen and has a height of $A\:\mathrm{cm}$. Each additional ice cream costs 100 yen, and each one increases the height of the ice cream tower by $B\:\mathrm{cm}$.

You want to buy an ice cream tower with a height of at least $S\:\mathrm{cm}$ from this shop. Find the minimum amount of money needed to buy an ice cream tower with a height of at least $S\:\mathrm{cm}$.

Input Format

The input is given from the standard input in the following format:

$ S $ $ A $ $ B $

Output Format

Output the minimum amount of money needed to buy an ice cream tower with a height of at least $S\:\mathrm{cm}$, omitting the unit (yen).

Sample Input and Output

Sample Input #1

28
20
5

Sample Output #1

450

Sample Input #2

1
100
1

Sample Output #2

250

Sample Input #3

100
1
1

Sample Output #3

10150

Notes/Hints

Constraints

  • $1\ \leqq\ S\ \leqq\ 100$.
  • $1\ \leqq\ A\ \leqq\ 100$.
  • $1\ \leqq\ B\ \leqq\ 100$.
  • All values given in the input are integers.

Sample Explanation 1

  • If no additional ice creams are added, the height of the ice cream tower is $20\:\mathrm{cm}$ and the cost is 250 yen.
  • If 1 additional ice cream is added, the height of the ice cream tower is $25\:\mathrm{cm}$ and the cost is 350 yen.
  • If 2 additional ice creams are added, the height of the ice cream tower is $30\:\mathrm{cm}$ and the cost is 450 yen.

Therefore, the minimum amount of money needed to buy an ice cream tower with a height of at least $28\:\mathrm{cm}$ is 450 yen, so output 450.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
28 20 5
样例输出
450