CF853D Michael and Charging Stations

Description

Michael has just bought a new electric car for moving across city. Michael does not like to overwork, so each day he drives to only one of two his jobs. Michael's day starts from charging his electric car for getting to the work and back. He spends $ 1000 $ burles on charge if he goes to the first job, and $ 2000 $ burles if he goes to the second job. On a charging station he uses there is a loyalty program that involves bonus cards. Bonus card may have some non-negative amount of bonus burles. Each time customer is going to buy something for the price of $ x $ burles, he is allowed to pay an amount of $ y $ ( $ 0

Input Format

The first line of input contains a single integer $ n $ ( $ 1

Output Format

Output the minimum amount of burles Michael has to spend.

Explanation/Hint

In the first sample case the most optimal way for Michael is to pay for the first two days spending 3000 burles and get 300 bonus burles as return. After that he is able to pay only 700 burles for the third days, covering the rest of the price with bonus burles. In the second sample case the most optimal way for Michael is to pay the whole price for the first five days, getting 1000 bonus burles as return and being able to use them on the last day without paying anything in cash.