#include <bits/stdc++.h>
int64_t t(int64_t n) {
  if (n <= 0) return 0;
  return n * (n + 1) / 2;
}
int64_t p(int64_t n, int64_t k, int64_t h) {
  auto rw = n - k;
  auto lw = k + 1;
  auto right = t(h) - t(h - rw);
  auto left = t(h) - t(h - lw);
  return right + left - h;
}
int64_t search(int64_t n, int64_t m, int64_t k) {
  int64_t l = 0;
  int64_t r = m + 1;
  while (r - l > 1) {
    int64_t mid = l + (r - l) / 2;
    auto t = p(n, k, mid);
    ((t <= m) ? l : r) = mid;
  }
  return l;
}
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(nullptr);
  int64_t n, m, k;
  std::cin >> n >> m >> k;
  k--;
  m -= n;
  int64_t h = search(n, m, k);
  std::cout << (h + 1) << std::endl;
}
