#include <bits/stdc++.h>
using namespace std;
long long int max(long long int a, long long int b) { return (a > b) ? a : b; }
long long int min(long long int a, long long int b) { return (a < b) ? a : b; }
long long int val(int n, int k, long long int h) {
  if (h == 1) {
    return 1;
  }
  long long int p = k - max(k - h + 1, 1);
  long long int q = min(n, k + h - 1) - k;
  long long int sol = h;
  sol += (((2 * h - p - 1) * (p)) + ((2 * h - q - 1) * (q))) / 2;
  return sol;
}
int main() {
  int n, m, k, ans = 0;
  cin >> n >> m >> k;
  m = m - n;
  ans++;
  long long int l = 0, h = 1000000000;
  if (m == 0) {
    cout << 1;
    return 0;
  }
  while (l <= h) {
    int mid = (l + h) / 2;
    if (val(n, k, mid) <= m && val(n, k, mid + 1) > m) {
      cout << mid + 1;
      return 0;
    } else if (val(n, k, mid) <= m) {
      l = mid + 1;
    } else {
      h = mid - 1;
    }
  }
  return 0;
}
