#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  long long n, a, b, c;
  cin >> n >> a >> b >> c;
  long long rem = n - b;
  long long add = (rem >= 0 ? max(1ll + (c + (rem % (b - c))) / a,
                                  (b + (rem % (b - c))) / a)
                            : 0);
  rem = max(0ll, rem);
  long long ans = (rem / (b - c)) + add;
  ans =
      max(ans,
          n / a + ((max(0ll, (n % a) - b)) / (b - c) + ((n % a) >= b) ? 1 : 0));
  cout << ans << "\n";
  return 0;
}
