#include <bits/stdc++.h>
using namespace std;
long long n, a, b, c;
int main() {
  cin >> n >> a >> b >> c;
  if (a >= b) {
    long long ans = 0;
    if (n - b >= 0) {
      ans += (n - b) / (b - c) + 1;
    }
    cout << ans << endl;
  } else {
    if (a <= (b - c)) {
      cout << (n / a) << endl;
    } else {
      long long ans = 0;
      if (n - b >= 0) {
        ans += (n - b) / (b - c) + 1;
        n -= ans * (b - c);
      }
      ans += n / a;
      cout << ans << endl;
    }
  }
  return 0;
}
