#include using namespace std; using ll = unsigned long long; bool hantei(ll A,ll B,ll X){ if(4*A*B<(X*X-A-B)*(X*X-A-B))return true; return false; } ll x(ll A,ll B){ //4AB<(X^2-A-B)^2となるような、最小のX ll l = 1;//ng ll r = 6000000009;//ok while(r-l>1){ ll mid = (l+r)/2; if(hantei(A,B,mid))r = mid; else l = mid; } return r; } ll N; int main(){ cin >> N; //√A+√B < X //A+B+2√AB> A >> B; cout << x(A,B) << endl; } }