#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000100;
const int INF = 1e9 + 10;
long long n, a, b, c;
int main() {
  while (cin >> n >> a >> b >> c) {
    long long ans = 0;
    if (n >= b && b - c < a)
      ans += 1 + (n - b) / (b - c), n -= (1 + (n - b) / (b - c)) * (b - c);
    ans += n / a;
    cout << ans << endl;
  }
  return 0;
}
