#define _USE_MATH_DEFINES #include #define FOR(i,a,b) for(int i = (a); i < (b); ++i) #define REP(i,n) FOR(i,0,n) #define SZ(n) (int)(n).size() #define ALL(n) (n).begin(), (n).end() using namespace std; typedef long long LL; typedef vector VI; int main() { int xp, yp; cin >> xp >> yp; double ans = ceil(hypot(xp, yp) * 2); (ans == hypot(xp, yp) * 2) ? ans++ : ans; cout << ans << endl; return 0; }