#Lutece1554. C0ins

C0ins

Migrated from Lutece 1554 C0ins

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

There are infinite coins with values 1,2,5,101, 2, 5, 10.

What's the minimum numbers of coins should be picked that XX and YY can be made change for?

Input

Two integers XX and YY. (1X,Y1091\leq X, Y\leq 10^9)

Output

The minimum numbers of coins should be picked.

Samples

8 9
4

Note

In sample, four coins 1,2,2,51, 2, 2, 5 and 1,1,2,51, 1, 2, 5 both can make change for 88 and 99.

Resources

The 15th UESTC Programming Contest Preliminary