#include <bits/stdc++.h>
using namespace std;
long long int N, a, b, c;
int main() {
  cin >> N >> a >> b >> c;
  long long int ans = 0, maxx;
  maxx = N / a;
  if (N >= b) {
    ans = (N - b) / (b - c) + 1;
    N -= ans * (b - c);
  }
  ans += N / a;
  maxx = max(maxx, ans);
  printf("%lld\n", maxx);
  return 0;
}
