#include <bits/stdc++.h>
using namespace std;
int n, m, k;
int anush = 1, a = 1;
int main() {
  cin >> n >> m >> k;
  m -= n;
  while (m > 0) {
    if (k + a <= n) anush++;
    if (k - a >= 1) anush++;
    m -= anush;
    a++;
  }
  cout << a;
  return 0;
}
