#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  scanf("%lld", &n);
  long long a, b, c;
  scanf("%lld", &a);
  scanf("%lld", &b);
  scanf("%lld", &c);
  if (a <= (b - c)) {
    printf("%lld\n", n / a);
  } else {
    n -= b;
    long long x = 0;
    if (n >= 0) {
      x = n / (b - c);
      n %= (b - c);
    }
    n += b;
    if (n >= b) {
      n = n - (b - c);
      x++;
    }
    x += max(n / a, n / b);
    printf("%lld\n", x);
  }
  return 0;
}
