#include <bits/stdc++.h>
using namespace std;
long long int n, m, k;
long long int check(long long int h, long long int mid) {
  if (h == 0) return 0;
  if (h >= mid) return ((mid * (mid + 1)) / 2 + h - mid);
  long long f = mid;
  long long g = mid - h;
  return ((f * (f + 1)) / 2 - (g * (g + 1)) / 2);
}
int main() {
  cin >> n >> m >> k;
  if (n == m) {
    cout << 1;
    return 0;
  }
  long long ans = 1;
  long long s = 1, e = m - (n) + 2;
  while (s + 1 < e) {
    long long mid = (s + e) / 2;
    if (check(k - 1, mid - 1) + mid + check(n - k, mid - 1) <= m) {
      ans = max(ans, mid);
      s = mid;
    } else
      e = mid;
  }
  cout << ans;
}
