A,B = list(map(int,input().split())) count = 0 for i in range(23,26): if A <= i <= B: pass else: count += 1 print(count)