a, b = map(int, input().split()) print(3 - len({23, 24, 25} & {i for i in range(a,b+1)}))