A, B = map(int, input().split()) D = [23, 24, 25] c = 0 for d in range(A, B + 1): if d in D: D.pop(D.index(d)) print(len(D))