lastDay = [31,28,31,30,31,30,31,31,30,31,30,31] ct = 0 for i in range(1,13): for j in range(1,lastDay[i-1]+1): if i == (j//10 + j%10): ct += 1 print(ct)