#include <bits/stdc++.h>
using namespace std;
long long a;
long long pl, gl, glb;
long long ans = 0;
long long put() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int main() {
  a = put();
  pl = put();
  gl = put();
  glb = put();
  long long glm = gl - glb;
  if (pl <= glm)
    printf("%I64d\n", a / pl);
  else {
    if (a >= gl) ans = 1 + (a - gl) / glm, a -= ans * glm;
    ans += a / pl;
    printf("%I64d\n", ans);
  }
  return 0;
}
