a, b = map(int, input().split()) c = list(i for i in range(1, 32) if not(a <= i <= b)) d = list(filter(lambda x : x in [23, 24, 25], c)) print(len(d))