#include using namespace std; using ll = long long; bool is_integer(double x){ return floor(x) == x; } int main(){ double xp,yp; cin >> xp >> yp; double ans = 0; double dist = sqrt(xp*xp + yp*yp); dist = 2*dist + 1; dist = floor(dist); ans = dist; cout << ans << endl; }