#include using namespace std; int main(void) { uint64_t A, B, mid; int ok = 1e5, ng = 2; cin >> A >> B; while (abs(ok - ng) > 1) { mid = (ok + ng) / 2; if (4 * A * B < ((mid * mid) - A - B) * ((mid * mid) - A - B)) { ok = mid; } else { ng = mid; } } cout << mid << endl; }