#abc099c. [abc099_c]Strange Bank
[abc099_c]Strange Bank
Problem Statement
To make it difficult to withdraw money, a certain bank allows its customers to withdraw only one of the following amounts in one operation:
-
yen (the currency of Japan)
-
yen, yen, yen, ...
-
yen, yen, yen, ...
At least how many operations are required to withdraw exactly yen in total?
It is not allowed to re-deposit the money you withdrew.
Constraints
- is an integer.
Input
Input is given from Standard Input in the following format:
Output
If at least operations are required to withdraw exactly yen in total, print .
Sample Input 1
127
Sample Output 1
4
By withdrawing yen, yen, yen and yen, we can withdraw yen in four operations.
Sample Input 2
3
Sample Output 2
3
By withdrawing yen three times, we can withdraw yen in three operations.
Sample Input 3
44852
Sample Output 3
16