#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long int n, a, b, c, ans = 0;
  cin >> n >> a >> b >> c;
  if (a <= (b - c) || n < b) {
    ans = (long long int)(n / a);
  } else {
    ans = (n - b) / (b - c) + 1;
    n -= ans * (b - c);
    ans += (n / a);
  }
  cout << ans << endl;
}
