#include using namespace std; using ll = long long; const int MAXV = 10000000; ll cnt[MAXV + 1]; int main() { cin.tie(0); ios::sync_with_stdio(false); for (int i = 0; i * i <= MAXV; i++) { for (int j = 0; j <= i; j++) { int sum = i * i + j * j; if (sum > MAXV) break; int add = (1 + (i != 0)) * (1 + (j != 0)); if (i != j) add *= 2; cnt[sum] += add; } } int x, y; cin >> x >> y; ll ans = 0; for (int i = x; i <= y; i++) { ans = max(ans, cnt[i]); } cout << ans << endl; return 0; }