#include <bits/stdc++.h>
using namespace std;
long long a, n, m;
long long functi(long long h) {
  long long ll = min(h, a), rr = min(h, n - a + 1);
  long long r =
      h * h - (h - ll) * (h - ll + 1) / 2 - (h - rr) * (h - rr + 1) / 2;
  return r;
}
long long confe(long long h) {
  long long hi = 1e9, lo = 0, mi;
  while (hi - lo > 1) {
    mi = (hi + lo) / 2;
    if (functi(mi) > h)
      hi = mi;
    else
      lo = mi;
  }
  return lo;
}
int main() {
  cin >> n >> m >> a;
  a = min(a, n - a + 1);
  m -= n;
  cout << confe(m) + 1 << endl;
  return 0;
}
