#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, a, b, c, f, k, d, m;
  f = 0;
  cin >> n >> a >> b >> c;
  if (a >= (b - c) && (b <= n)) {
    d = n - b;
    k = d / (b - c);
    m = d % (b - c);
    f = k;
    n = m + b;
  }
  while (a >= (b - c) && (b <= n)) {
    n = n - b + c;
    f++;
  }
  if (a <= n) f = f + n / a;
  cout << f;
  return 0;
}
