ATM#266

ATM

1 second
128 megabytes
Easy (≈1000)

There are enough banknotes of 10, 20, 50, 100, 200, and manat denominations available in the ATM. Find the minimum number of banknotes required to pay an amount of manat, or print if it is not possible to pay the specified amount.

Input

An integer n~(1 \le n \le 10^6) is given.

Output

The minimum number of banknotes required to pay an amount of manat.

Examples

manat can be paid in the following way: 500 + 200 + 50 + 20.

Example 1

Loading
Loading