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