c = 0 for i in range(1, 13): for j in range(1, 31): if i == j//10 + j%10: c += 1 print(c)