#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const double eps = 1e-13;
const int N = 100005;
long long n, a, b, c;
int main() {
  cin >> n >> a >> b >> c;
  long long mx = 0;
  if (n >= b) {
    mx = (n - b) / (b - c) + 1;
  }
  b -= c;
  long long ans = n / a;
  ans = max(ans, mx + (n - mx * b) / a);
  cout << ans << endl;
  return 0;
}
