C. Capturing Bronze
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

You are given $$$n$$$ ($$$1 \leq n \leq 100$$$) pieces of bronze. Each piece of bronze has a distinct weight ranging from $$$1$$$ to $$$n$$$. The nearby pawn shop has interesting criteria for determining whether or not they will take a piece of bronze. They will weigh the piece of bronze, take the sum of the squares of all digits in the weight, and repeat this process with the new sum. If this number eventually reaches $$$1$$$, they will accept the piece of bronze. Otherwise, they will reject it. How many pieces of bronze will the pawn shop accept?

Input

The first and only line of input will contain $$$n$$$ ($$$1 \leq n \leq 100$$$).

Output

Output the number of pieces of bronze the pawn shop will accept.

Examples
Input
5
Output
1
Input
1
Output
1
Input
20
Output
5