a, b = map(int, input().split()) camp = range(23, 26) cnt = 0 for day in camp: if day < a or b < day: cnt += 1 print(cnt)