#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned long long int n, m, k, c, np, r, l, w, t;
  cin >> n >> m >> k;
  if (n == 1) {
    cout << m;
    return 0;
  }
  if (n != m) {
    m -= n;
    c = 0;
    r = 0;
    l = 0;
    np = 1;
    while (c <= m) {
      if (l + r + 1 != n) {
        c += l + r + 1;
        if (l < k - 1) l = l + 1;
        if (r < n - k) r = r + 1;
        np = np + 1;
      } else {
        t = (unsigned long long int)((m - c) / n);
        np += t;
        cout << np;
        return 0;
      }
    }
    cout << np - 1;
  } else {
    cout << 1;
  }
  return 0;
}
