#include using namespace std; int main() { long x, y; cin >> x >> y; vector v; v.assign(pow(10, 7) + 1, 0); for (int a = 0; a < 3164; a++) { for (int b = 1; b < 3164; b++) { if (a * a + b * b > pow(10, 7)) { break; } v.at(a * a + b * b) += 1; } } int ans = 0; for (int i = x; i < y+1; i++){ ans = max(ans, v.at(i)*4); } cout << ans << endl; }