#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, k;
  cin >> n >> m >> k;
  long long res = m - n;
  long long ans = min(k - 1, n - k) + 1;
  long long len = 2 * ans - 1;
  long long need = ans * ans;
  if (need > res) {
    while (need > res) {
      ans--;
      need -= len;
      len -= 2;
    }
  } else if (need < res) {
    while (need < res) {
      ans++;
      if (len < n) {
        len++;
      } else {
        long long t = (res - need) / n;
        ans += t;
        need += (t + 1) * n;
        break;
      }
      need += len;
    }
    if (need > res) {
      ans--;
    }
  }
  cout << ans + 1 << endl;
}
