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