a,b=map(int,input().split());d=0 for i in range(a,b+1): if i in [23,24,25]: d+=1 print(3-d)