Problem A. Absolutely simple

Author:A. Klenin   Time limit:1 sec
Input file:input.txt   Memory limit:256 Mb
Output file:output.txt  

Statement

Vasya likes to decrease numbers, but does not like negative numbers. So, he picks some integer A1 and starts to decrease it by 100 and take an absolute value of the result. In other words, on each step he calculates next number in the sequence Ai + 1 = |Ai − 100|.

When Vasya calculates a number which was already present in the sequence, he gets bored and stops. Your program must, given A1, determine the number of steps Vasya would perform.

For example, if A1 = 1 then A2 = |1 − 100| = 99, and A3 = |99 − 100| = 1, so Vasya performs 2 steps.

Input file format

Input file contains a single integer A1.

Output file format

Output file must contain a single integer N — number of steps.

Constraints

0 ≤ |A1| ≤ 109

Sample tests

No. Input file (input.txt) Output file (output.txt)
1
1
2
2
-1
4
3
500
6

0.090s 0.014s 13