#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int i, j, k, m, n, t, ans, left, right, count;
  cin >> n >> m >> k;
  k--;
  left = k;
  right = k;
  count = 1;
  m = m - n;
  while (1) {
    m = m - (k - left);
    m = m - (right - k);
    m -= 1;
    if (m < 0)
      break;
    else
      count++;
    if (left != 0) left--;
    if (right != n - 1) right++;
    if (left == 0 && right == n - 1) {
      count += (m / n);
      break;
    }
  }
  cout << count << endl;
}
