func_code_string: #include <bits/stdc++.h>   using namespace std;   const int INF = 2e9;   long long int n, h;   bool check(long long int maxh) {     long long int k = min(maxh, h);     long long int count = maxh * maxh - k * (k - 1) / 2;     return (n >= count);   }   long long int get(long long int maxh) {     long long int k = min(h, maxh);     long long int count = maxh * maxh - k * (k - 1) / 2;     long long int length = (2 * maxh - 1) - (k - 1);     n -= count;     return length + (n + maxh - 1) / maxh;   }   int main() {     cin >> n >> h;     long long int l = 1, r = INF;     while (l < r - 1) {       long long int m = l + (r - l) / 2;       if (check(m))         l = m;       else         r = m;     }     cout << (check(r) ? get(r) : get(l)) << endl;     return 0;   }   