#include <bits/stdc++.h>
using namespace std;
long long n, m, k;
long long a, b;
long long ans;
long long now, gap;
int main() {
  scanf("%lld%lld%lld", &n, &m, &k);
  long long i, j, temp;
  a = k - 1;
  b = n - k;
  if (a > b) swap(a, b);
  m -= n;
  m -= 1;
  ans = 2;
  now = 1;
  gap = 2;
  temp = a * (a + 2);
  if (m - temp <= 0) {
    ans += (long long)(sqrt(m + 1) - 1);
    printf("%lld\n", ans);
    return 0;
  }
  m -= temp;
  ans += a;
  now += 2 * a;
  gap = 1;
  temp = (2 * now + (b - a) + 1) * (b - a) / 2;
  if (m - temp <= 0) {
    ans += (long long)(sqrt(2 * m + (2.0 * now + 1) * (2.0 * now + 1) / 4) -
                       (2.0 * now + 1) / 2);
    printf("%lld\n", ans);
    return 0;
  }
  m -= temp;
  ans += (b - a);
  now += (b - a);
  gap = 0;
  ans += (long long)(m / now);
  printf("%lld\n", ans);
  return 0;
}
