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