#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int x, y; cin >> x >> y; long long ans = 0; for(int i = x; i <= y; i++) { if(i & 1 && i % 4 != 1) continue; if(i & 1 == 0 && i % 4 != 2) continue; long long tmp = 0; for(int j = 1; j * j <= i; j++) { if(i % j) continue; int k = i / j; if(j % 4 == 1) tmp++; if(j % 3 == 0) tmp--; if(k == j) continue; if(k % 4 == 1) tmp++; if(k % 3 == 0) tmp--; } ans = max(4 * tmp, ans); } cout << ans << endl; return 0; }