#include <bits/stdc++.h>
using namespace std;
long long N, M, K;
inline long long ar_sum(long long x) { return (x * x + x) / 2; }
bool can(long long x) {
  long long prec = K, after = N - 1 - K;
  long long sx;
  if (prec <= x - 1) {
    sx = ar_sum(x - 1) - ar_sum(x - 1 - prec);
  } else {
    sx = ar_sum(x - 1) + prec - x + 1;
  }
  long long dx;
  if (after <= x - 1) {
    dx = ar_sum(x - 1) - ar_sum(x - 1 - after);
  } else {
    dx = ar_sum(x - 1) + after - x + 1;
  }
  return (sx + dx + x <= M);
}
long long bs(long long a, long long b) {
  if (a + 1 == b) return a;
  long long mid = (a + b) / 2;
  if (can(mid)) return bs(mid, b);
  return bs(a, mid);
}
int main() {
  cin >> N >> M >> K;
  K--;
  cout << bs(1, 1e9 + 1);
  return 0;
}
