A, B = map(int, input().split()) a = [23, 24, 25] count = 0 for i in a: if A <= i <= B: pass else: count += 1 print(count)