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