#include #include using namespace std; using namespace atcoder; using ll = long long; using ld = long double; int x, y; int main() { cin >> x >> y; double rr = 2.0 * sqrt(x * x + y * y) + 1e-10; int ans = ceil(rr); if ((double)ans - rr < 1e-10) ans++; cout << ans << endl; return 0; }