a,b=[int(i)for i in input().split()] list=[] for i in range(a,b+1): list.append(i) c=0 for i in list: if i==23 or i==24 or i==25: c+=1 print(3-c)