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