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