Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

EIDISCOU - DISCOUNT

ABC store applies a promotion on the opening day. Customers are discounted based on different levels. Specifically:

    Amount of money between 1 thousand VND to 2 million VND: no discount

    Amount of money from 2 million VND to 10 million VND : 3% discount

    Amount of money from 10 million VND to 50 million VND : 5% discount

    Amount of money  from 50 million VND to 100 million VND7% discount

    Amount of money  from 100 million VND to 200 million VND10% discount

    Amount of money  from 200 million VND to 500 million VND: 12% discount

    Amount of money over 500 milion VND: 15% discount

* Discount rate is applied on the amount of each level, not on the whole bill. The payment amount is rounded to the nearest whole number

The software of the store has calculated the total value of the items (N, a multiple of 1000) that the customer purchases. Write a program that helps the store calculate the amount the customer has to pay.

Cá»­a hàng ABC áp dỼng má»™t chính sách khuyáşżn mãi nhân ngày khai trĆ°ĆĄng. Khách hàng �ược chiáşżt khẼu dá»±a trên từng mỊc khác nhau. CỼ thể:
Từ 1 nghìn �ến 2 triệu �ồng: không giảm giá
Từ trên 2 triệu �ến 10 triệu: giảm 3% giá trị 
Từ trên 10 triệu �ến 50 triệu: giảm 5% giá trị
Từ trên 50 triệu �ến 100 triệu: giảm 7% giá trị
Từ trên 100 triệu �ến 200 triệu: giảm 10% giá trị
Từ trên 200 triệu �ến 500 triệu: giảm 12% giá trị
Từ trên 500 triệu �ến 1 tá»· : giảm 15% giá trị
Từ trên 1 tá»·  ďż˝áşżn 5 tá»·: giảm 17% giá trị
Trên 5 tá»·: giảm 20% giá trị
Tỉ lệ chiáşżt khẼu �ược áp dỼng trên từng mỊc, không áp dỼng trên toàn bá»™ hóa �ƥn.
Tổng số tiền giảm �ược tính tá»›i hàng nghìn (không tính các chữ số phần tháş­p phân).
Khách hàng D biáşżt chính sách của cá»­a hàng nên ďż˝ã mua rẼt nhiều �ồ. Anh Ẽy biáşżt tổng giá trị là K nghìn �ồng nhĆ°ng trong túi có M nghìn �ồng. Giúp anh ta kiểm tra xem anh Ẽy có �ủ tiền hay không? 

Input

A single line consists of 1 positive integer N (1,000 ≤ N ≤ 5 * 10 ^ 9).

Output

A single line is the amount that the customer must pay.

Example

Input:

20000000

Output: 19260000
Input:

55555000

Output:

52926150

 


Added by:Ha Minh Ngoc
Date:2015-03-18
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:CSHARP C++ 4.3.2 CPP CPP14 CPP14-CLANG FSHARP GO JAVA JS-MONKEY NODEJS PHP PYTHON PYPY PYTHON3 RUBY SQLITE SWIFT VB.NET
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.