Cash Machine#138

Cash Machine

1 second
128 megabytes
Easy

An ATM has an unlimited number of banknotes with denominations 10, 20, 50, 100, 200, and . Given an integer , determine the minimum number of banknotes required to obtain exactly units. If it is not possible to obtain the exact amount, print .

Input

The input contains a single integer (1 \le n \le 10^6).

Output

Output the minimum number of banknotes required to obtain exactly units. If it is not possible, print .

Examples

For example, the amount can be obtained as: 500 + 200 + 50 + 20.

Example 1

Loading
Loading