#include using namespace std; using ll = int64_t; ll L, R; void input() { ios::sync_with_stdio(false); cin.tie(nullptr); cin >> L >> R; } void solve() { ll l, r; if (L <= 295) l = 0; else if (L <= 416) l = 1; else l = 2; if (R <= 295) r = 0; else if (R <= 416) r = 1; else r = 2; cout << r-l << endl; } int main() { input(); solve(); return 0; } /* 考察 */