#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, m, k;
  cin >> n >> m >> k;
  int ans = 1;
  m -= n;
  if (m > (long long)n * (n + 1) / 2) {
    int bottom = (m - n * (n + 1) / 2) / n;
    ans += bottom;
    m -= bottom * n;
  }
  for (int(i) = 0; (i) < (int)(m); ++(i)) {
    if (i < k - 1)
      m -= i;
    else
      m -= k - 1;
    if (i < n - k)
      m -= i;
    else
      m -= n - k;
    m--;
    if (m >= 0)
      ans++;
    else
      break;
  }
  cout << ans << endl;
  return 0;
}
