x = 0 for i in range(1, 13): for j in range(10, 31): if i == int(str(j)[0]) + int(str(j)[1]): x += 1 print(x + 9)