imos = [0] * (422) imos[296] += 1 imos[417] += 1 for i in range(421): imos[i+1] += imos[i] l, r = map(int,input().split()) print(imos[r] - imos[l])