a, b = map(int, input().split()) print(3 - len(set(range(a, b + 1)) & set([23, 24, 25])))