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