#include <bits/stdc++.h>
using namespace std;
unsigned long long n, a, b, c;
unsigned long long ans;
int main() {
  while (~scanf("%lld", &n)) {
    ans = 0;
    scanf("%lld%lld%lld", &a, &b, &c);
    if (n >= b && b - c <= a) {
      unsigned long long sum = ((n - b) / (b - c) + 1);
      n -= sum * (b - c);
      ans += sum;
    }
    ans += n / a;
    printf("%lld\n", ans);
  }
  return 0;
}
