Problems
The level of palindrome
The level of palindrome
You have a positive integer m. If it is not a palindrome, than we write it in back order and add it to original number m. Steps are repeated till we'll receive a number - palindrome. The number of such operations we call the palindrome level for m.
Find the level of palindrome for m.
Input
One number m (0 < m < 10000).
Output
Print the palindrome level for m.
Input example #1
865
Output example #1
2