#include using namespace std; typedef long long ll; typedef string str; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); ll l, r; cin >> l >> r; ll ans = 0; if (l <= 295 && 296 <= r) ans++; if (l <= 416 && 417 <= r) ans++; cout << ans << "\n"; return 0; }