#include using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); unsigned long long a, b; cin >> a >> b; assert(1 <= a && a <= 1000000000); assert(1 <= b && b <= 1000000000); unsigned long long ok = 65000, ng = 0; while(ok - ng > 1){ unsigned long long mid = (ok + ng) / 2; if(4ULL * a * b < (mid * mid - a - b) * (mid * mid - a - b)){ ok = mid; }else{ ng = mid; } } cout << ok << endl; }