<PREV Problem:
NEXT>
Solved by 1216 users: ...
 < 
 < 
 < 
 < 
 < 
 < 
 < 
 < 
 < 
 < 

Operations

Time limit = 5 second(s)

Memory limit = 8 Mb

You can perform the following operations. The number i is integer. Find the minimal number of operations to get 0.

Input Integer 0 ≤ N ≤ 2000000

Input#1
4
Output#1
3
Input#2
15
Output#2
6
Input#3
59
Output#3
9

Author:
Voroztsov Artem, IV MIPT Contest

<PREV | Problem set | Search related messages | NEXT>


© acm.mipt DevGroup
The page was generated in 220ms

SW soft NIX
ID = 54.162.181.75