first = input() first_data = first.split(" ") from_d = int(first_data[0]) to_d = int(first_data[1])+1 result = 3 for number in range(from_d,to_d): if number == 23: result = result -1 if number == 24: result = result -1 if number == 25: result = result -1 print(result)