#include #include using namespace std; int main(){ int xp,yp; cin >> xp >> yp; cout << int(sqrt(pow(xp,2) + pow(yp,2)) + 1) * 2 << endl;; }