#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long i, j, n, m, k, t = 0;
  cin >> n >> m >> k;
  long long s = 1, e = 10000000000LL, x;
  m = m - n;
  while (e >= s) {
    long long x = (s + e) / 2LL;
    long long le = min(x, k - 1), re = min(x, n - k);
    long long reqd =
        (1 + le + re) * x - (le * (le + 1)) / 2 - (re * (re + 1)) / 2;
    if (reqd > m) {
      e = x - 1;
    } else {
      s = x + 1;
      t = x;
    }
  }
  cout << t + 1 << endl;
  return 0;
}
