#include <bits/stdc++.h>
using namespace std;
int main(int argc, const char** argv) {
  long long n, m, k;
  cin >> n >> m >> k;
  m -= n;
  if (m <= 1) {
    cout << 1 + m << endl;
    return 0;
  }
  long long a = n - k, b = n - a - 1;
  long long maxF = m, minF = 1;
  long long f = m;
  long long best = 1;
  while (true) {
    long long l = min(a, f), r = min(b, f);
    long long p = (l + r + 1) * f - l * (l + 1) / 2 - r * (r + 1) / 2;
    if (p <= m)
      minF = f;
    else
      maxF = f;
    if (p <= m) best = max(best, f);
    if (f == (maxF + minF) >> 1) break;
    f = (maxF + minF) >> 1;
  }
  cout << (best + 1) << endl;
  return 0;
}
