import itertools P = [0] * 421 P[296] = 1 P[417] = 1 P = list(itertools.accumulate(P)) L, R = map(int, input().split()) ans = P[R] - P[L] print(ans)