
Given a positive integer . If is not a palindrome, write its digits in reverse order and add this number to . Repeat this procedure until a palindrome is obtained. The number of such operations is called the palindrome level of .
Find the palindrome level of .
The input contains a single integer (0 < m < 10000).
Print the palindrome level of .
Example 1