#include #include using namespace std; int main() { int x, y; cin >> x >> y; int res = ceil(2 * hypot(x, y)); cout << res + (res == 2*hypot(x, y) ? 1 : 0) << endl; }