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