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