#include <bits/stdc++.h>
using namespace std;
long long n, m, k;
long long minPillowForSide(long long bed, long long x) {
  long long ret = (x - 1) * x / 2;
  if (bed > x - 1) {
    ret += bed - (x - 1);
  } else if (bed < x - 1) {
    long long tmp = x - 1 - bed;
    ret -= tmp * (tmp + 1) / 2;
  }
  return ret;
}
bool check(long long x) {
  return (minPillowForSide(k - 1, x) + x + minPillowForSide(n - k, x) <= m);
}
long long binSearch(long long s, long long t) {
  long long ret;
  while (s <= t) {
    long long mid = (s + t) >> 1;
    if (check(mid)) {
      ret = mid;
      s = mid + 1;
    } else {
      t = mid - 1;
    }
  }
  return ret;
}
int main() {
  cin >> n >> m >> k;
  cout << binSearch(1, m) << endl;
  return 0;
}
