#include using namespace std; typedef long long ll; int main() { double x, y; cin >> x >> y; ll r = sqrt(x * x + y * y); ll ans = 2 * r + 1; cout << ans << '\n'; return 0; }