#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const double eps = 1e-8;
const int MAX = 120;
const int mod = 1e9 + 7;
long long n, m, k;
long long ssum(long long ll, long long kk) {
  long long ans = ll * (kk - ll - 1 + kk) / 2;
  if (kk < ll) ans = ll + (kk - 1) * (kk - 2) / 2;
  return ans;
}
int main() {
  cin >> n >> m >> k;
  long long len1 = k - 1, len2 = n - k;
  long long low = 1, high = m - n + 1, mid, sum1, sum2, ans;
  while (low <= high) {
    mid = (low + high) / 2;
    sum1 = ssum(len1, mid) + ssum(len2, mid) + mid;
    sum2 = n * mid;
    if (sum1 > m)
      high = mid - 1;
    else {
      ans = mid;
      low = mid + 1;
    }
  }
  cout << ans << endl;
  return 0;
}
