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