#include <bits/stdc++.h>
using namespace std;
const int INF = (int)1e9;
const long long INF64 = (long long)1e18;
#pragma comment(linker, "/STACK:16777216")
#pragma warning(disable : 4786)
int Set(int N, int pos) { return N = N | (1 << pos); }
int Reset(int N, int pos) { return N = N & ~(1 << pos); }
bool check(int N, int pos) { return (bool)(N & (1 << pos)); }
double dis(int x1, int y1, int x2, int y2) { return hypot(x1 - x2, y1 - y2); }
long long GCD(long long a, long long b) {
  if (b == 0) return a;
  return GCD(b, a % b);
}
long long LCM(long long a, long long b) { return (a / GCD(a, b)) * b; }
long long ans, t, n, k, m, midpoint;
long long calc(long long x, long long id) {
  long long ret = 0;
  ret = x * id;
  ret -= (id * (id - 1)) / 2;
  return ret;
}
int f(long long x) {
  long long lf = min(x - 1, k - 1);
  long long ri = min(x - 1, n - k);
  long long sum = calc(x - 1, lf);
  sum += calc(x - 1, ri);
  sum += x;
  if (sum <= m) return 1;
  return 0;
}
int main() {
  cin >> n >> m >> k;
  m -= n;
  midpoint = (n + 1) / 2;
  if (k > midpoint) k = n - k + 1;
  long long low = 1, high = m, md;
  while (low <= high) {
    md = (low + high) / 2;
    if (f(md)) {
      ans = md;
      low = md + 1;
    } else
      high = md - 1;
  }
  ans++;
  cout << ans << "\n";
  return 0;
}
