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