eolymp
bolt
Try our new interface for solving problems
Problems

Subway rides

Subway rides

A token for one metro trip costs 4 UAH. If more trips are planned, then you can purchase a ticket, which price for 10 trips is 30 UAH, for 50 - 125 UAH, and for 100 - 200 UAH. What is the minimum sum you need to spend to pay for at least m metro rides?

Input

One positive integer m (1m1000).

Output

Print the required minimum sum.

Time limit 1 second
Memory limit 128 MiB
Input example #1
25
Output example #1
80
Source III stage All-Ukrainian informatics Olympiad in Zhitomir region 2016-2017