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