#include <bits/stdc++.h>
using namespace std;
const int INF = 0x7fffffff;
inline int reint() {
  int d;
  scanf("%d", &d);
  return d;
}
inline long relong() {
  long l;
  scanf("%ld", &l);
  return l;
}
inline char rechar() {
  scanf(" ");
  return getchar();
}
inline double redouble() {
  double d;
  scanf("%lf", &d);
  return d;
}
inline string restring() {
  string s;
  cin >> s;
  return s;
}
long long n, a, b, c;
long long k, l;
int main(void) {
  cin.sync_with_stdio(false);
  cin >> n >> a >> b >> c;
  long long ans = 0;
  if (a < b - c) {
    ans = n / a;
  } else {
    if (n >= b) k = (n - c) / (b - c);
    l = (n - k * (b - c)) / a;
    ans = k + l;
  }
  cout << ans << endl;
  return 0;
}
