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