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