import math cnt=0 for m in range(1,12): for d in range(1,31): if m == math.floor(d)+(d-math.floor(d)): cnt+=1 print(cnt)