l, r = map(int, input().split()) cnt = 0 for i in range(l, r): if i == 295 and i+1 == 296: cnt += 1 elif i == 416 and i+1 == 417: cnt += 1 print(cnt)