a, b = map(int, input().split(' ')) trip = [i for i in range(a, b+1)] pa = [23, 24, 25] ans = [k for k in pa if k in trip] print(3-len(ans))