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