#pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include using namespace std; using ll = long long; using vll = vector; #define rep(i, n) for (ll i = 0; i < (ll) (n); i++) template bool chmax(T& p, T q, bool C = 1) { if (C == 0 && p == q) { return 1; } if (p < q) { p = q; return 1; } else { return 0; } } int main() { cin.tie(nullptr); ios::sync_with_stdio(false); ll X,Y; cin>>X>>Y; vll P(Y+1,0); ll an=0; for(ll x=1;x*x<=Y;x++){ for(ll y=0;x*x+y*y<=Y;y++){ P[x*x+y*y]+=4; if(x*x+y*y>=X)chmax(an,P[x*x+y*y]); } } cout<