A, B = map(int, input().split()) ans = 0 for d in range(23, 26): if A <= d <= B: continue ans += 1 print(ans)