a_b = [int(i) for i in input().split()] a = a_b[0] b = a_b[1] trip = [i+a for i in range(b - a + 1)] days = [23, 24, 25] if 23 in trip: days.remove(23) if 24 in trip: days.remove(24) if 25 in trip: days.remove(25) print(len(days))