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