Consider the following algorithm:

Given one integer n. Please output the count after processing the algorithm.
The input includes multiple test cases. In each test case, the first line contains one integer n. Guarantee the algorithm won’t go into infinite steps when n is between 1 and 106.
1<= n <= 106
The one line contains one integer which indicates the count.