#include <bits/stdc++.h>
const long long MOD = 1000000007;
long long check(long long x, long long k) {
  return x + 2 * k * x - (k * (k + 1));
}
long long f(long long x, long long k, long long n) {
  long long res = 0;
  long long left = std::min(x - 1, k - 1);
  long long right = std::min(x - 1, n - k);
  res += left * x - (left * (left + 1)) / 2;
  res += right * x - (right * (right + 1)) / 2;
  res += x;
  return res;
}
int main() {
  long long n, m, k;
  std::cin >> n >> m >> k;
  int pillows = m - n;
  long long l = 0, r = pillows + 1;
  long long ans = 0;
  while (l < r) {
    long long m = (l + r) / 2;
    long long val = f(m, k, n);
    if (val < pillows)
      l = m + 1;
    else if (val > pillows)
      r = m - 1;
    if (val == pillows) {
      l = m;
      break;
    }
  }
  if (f(l, k, n) > pillows) --l;
  std::cout << l + 1 << std::endl;
  return 0;
}
