a,b = list(map(int,input().split())) print(sum([1 for i in range(a,b+1) if not(i in (23,24,25))]))