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