#include #define REP(i,n) for(int i=0; i<(n); i++) #define REP2(i,x,n) for(int i=x; i<(n); i++) using namespace std; struct CWW{CWW(){ios::sync_with_stdio(false);cin.tie(0);}}cww; int main() { int X, Y; cin >> X >> Y; int res = ( sqrt( pow( X, 2 ) + pow( Y, 2 ) ) + 0.5 ) * 2; cout << res << endl; return 0; }