#include <bits/stdc++.h>
using namespace std;
int main() {
  long long x, q, a, b, c, ans = 0;
  cin >> x >> a >> b >> c;
  q = x;
  ans += (x - b + 1) / (b - c) + ((x - b + 1) % (b - c) != 0);
  if (ans > 0) x -= ans * (b - c);
  ans += x / a;
  ans = max(ans, q / a);
  long long anss = 0;
  anss += q / a;
  q -= anss * a;
  anss += (q - b + 1) / (b - c);
  ans = max(ans, anss);
  cout << ans << endl;
  return 0;
}
