A, B = input().strip().split(' ') A, B = int(A), int(B) A, B = min(A, B), max(A, B) lst = [23, 24, 25] cnt = len(lst) for i in range(A, B + 1): if i in lst: cnt -= 1 print(cnt)