a,b = map(int,input().split()) s = {23,24,25} for i in range(a,b+1): s.discard(i) print(len(s))