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