A, B = map(int, input().split())
dates = [23, 24, 25]
count = 0
for d in dates:
    if d < A or d > B:
        count += 1
print(count)