ans = 0 for i in range(1, 13): for j in range(1, 32): if len(str(j)) == 1: if j == i: ans += 1 else: if int(str(j[0])) + int(str(j[1])) == i: ans += 1 print(ans)