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