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