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