#include <iostream>
#include <cmath>
using namespace std;
int main(){
unsigned long long s1;
unsigned long long s2;
cin >> s1 >> s2;
double sqrtOfHeight = sqrt(s1) + sqrt(s2);
cout << (unsigned long long) (1000 * sqrtOfHeight * sqrtOfHeight);
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y21hdGg+CiAKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKIAppbnQgbWFpbigpewogICAgdW5zaWduZWQgbG9uZyBsb25nIHMxOwogICAgdW5zaWduZWQgbG9uZyBsb25nIHMyOwogICAgY2luID4+IHMxID4+IHMyOwogICAgZG91YmxlIHNxcnRPZkhlaWdodCA9IHNxcnQoczEpICsgc3FydChzMik7CiAgICBjb3V0IDw8ICh1bnNpZ25lZCBsb25nIGxvbmcpICgxMDAwICogc3FydE9mSGVpZ2h0ICogc3FydE9mSGVpZ2h0KTsKfQ==