#include <bits/stdc++.h>
using namespace std;
long long MOD = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(0);
  long long a, b, c, n;
  cin >> n >> a >> b >> c;
  long long x = b - c;
  long long ans = 0;
  if (n < min(x, a)) {
    cout << 0 << endl;
    return 0;
    ;
  }
  if (x < a and n >= b) {
    ans = (n - b) / x;
    n -= ans * x;
    while (n >= b) {
      ans++;
      n -= x;
    }
    ans += n / a;
  } else {
    ans += n / a;
  }
  cout << max(0ll, ans) << endl;
  return 0;
  ;
  return 0;
}
