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