loading
main.py
1
2
3
4
5
6
7
8
9
10
11
n = int(input())
answer = 0

while True:
    n = n + int(str(n)[::-1])
    answer += 1
    if str(n) == str(n)[::-1]:
        break

print(answer)