A, B = map(int, input().split()) print(len({23, 24, 25} - set(range(A, B + 1))))