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