typedef int ll; #include using namespace std; int main() { ll x,y; std::cin >> x>>y; // unordered_map cou; int cou[10000001]; ll sq = (int)sqrt(y); for (ll i = 1; i <= sq; i++) { for (ll j = 0; j <= sq; j++) { cou[i*i+j*j]++; } } ll result = -1; for (ll i = x; i <= y; i++) { result = max(result,cou[i]); } std::cout << result*4 << std::endl; }