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