#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, k;
  while (~scanf("%lld%lld%lld", &n, &m, &k)) {
    if (n == 1) {
      printf("%lld\n", m);
      continue;
    }
    m -= n;
    long long int ans = 1;
    int j = 1;
    while (m > 0) {
      if (k + ans <= n) {
        j++;
      }
      if (k - ans > 0) {
        j++;
      }
      m -= j;
      ans++;
    }
    printf("%lld\n", ans);
  }
}
