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