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