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