#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, a, b, c, x, ans = 0;
  scanf("%lld%lld%lld%lld", &n, &a, &b, &c);
  x = b;
  b -= c;
  if (n < x || a <= b)
    printf("%lld\n", n / a);
  else {
    if ((n - x) % b) {
      ans = (n - x) / b + 1;
      n -= ans * b;
      if (n >= a) ans += (n / a);
    } else {
      ans = (n - x) / b + 1;
      n -= ans * b;
      if (n >= a) ans += (n / a);
    }
    printf("%lld\n", ans);
  }
  return 0;
}
