n = int(input())
num = n
cnt = 0

while(1):
    a = num // 10
    b = num % 10
    num = (b * 10) + ((a+b)%10)
    cnt += 1
    if (n == num):
        break

print(cnt)

+ Recent posts