#include <bits/stdc++.h>
using namespace std;
int n, m, k;
bool check(int num) {
  long long all = num;
  int l = k - 1;
  int r = n - k;
  if (l <= num - 1) {
    int st = num - l, ed = num - 1;
    all += (st + ed) * 1LL * (ed - st + 1) / 2;
  } else {
    int st = 1, ed = num - 1;
    all += (st + ed) * 1LL * (ed - st + 1) / 2;
    all += l - (ed - st + 1);
  }
  if (all > m) return false;
  if (r <= num - 1) {
    int st = num - r, ed = num - 1;
    all += (st + ed) * 1LL * (ed - st + 1) / 2;
  } else {
    int st = 1, ed = num - 1;
    all += (st + ed) * 1LL * (ed - st + 1) / 2;
    all += r - (ed - st + 1);
  }
  if (all > m) return false;
  if (all <= m) return true;
  return false;
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  int left = 1, right = m;
  int ans = 1;
  while (left <= right) {
    int mid = (left + right) >> 1;
    if (check(mid)) {
      left = mid + 1;
      ans = mid;
    } else {
      right = mid - 1;
    }
  }
  cout << ans << endl;
  return 0;
}
