count = 0 for i in range(1,13): for n in range(1,30): f = n // 10 s = n % 10 if (f+s) == n: count += 1 print(count)