#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, a, b, c;
  cin >> n >> a >> b >> c;
  long long ans_glass;
  if (n >= b) {
    long long glass = (n - b) / (b - c) + 1;
    long long rem = n - (b - c) * glass;
    ans_glass = glass + rem / a;
  } else
    ans_glass = 0;
  cout << max(ans_glass, n / a) << '\n';
  return 0;
}
