#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.sync_with_stdio(0);
  cin.tie(NULL);
  cout << fixed << setprecision(25);
  int m, n, k;
  cin >> n >> m >> k;
  int cur = 0;
  m -= n;
  int ans = 1;
  while (m >= 0) {
    if (cur >= (n - k) && cur >= (k - 1)) {
      cout << ans + m / n;
      return 0;
    }
    m -= min(cur, n - k) + min(cur, k - 1) + 1;
    cur++;
    ans++;
  }
  cout << ans - 1;
  return 0;
}
