This page is still under construction.

Parts of this page are still being built. What you see may change.

Ice Cream

Time limit2sMemory limit1024 MB

Summary
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.

Examples3

  1. Example 1

    Input
    28
    20
    5
    
    Expected output
    450
    
  2. Example 2

    Input
    1
    100
    1
    
    Expected output
    250
    
  3. Example 3

    Input
    100
    1
    1
    
    Expected output
    10150