#include <bits/stdc++.h>
using namespace std;
long long a, b, c, x, y, sum, contr = 0, x2, y2, comp, x3, y3;
int main() {
  cin >> a >> b >> c;
  x = a - c;
  y = c - 1;
  if (x > 0) x2 = 1;
  if (y > 0) y2 = 1;
  b -= a;
  contr++;
  if (b > 0) {
    b--;
    contr++;
  }
  while (b >= 0) {
    sum = x2 + y2 + 1;
    if (x3 == 1 && y3 == 1) {
      contr = contr + (b / a);
      cout << contr;
      return 0;
    }
    if (sum <= b) {
      contr++;
      if (x2 < x)
        x2++;
      else {
        x3 = 1;
      }
      if (y2 < y)
        y2++;
      else {
        y3 = 1;
      }
      b = b - sum;
    } else {
      cout << contr;
      return 0;
    }
  }
  return 0;
}
