#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1e6 + 10;
int a[MAX_N];
int res;
const int BUFSIZE = 1000000;
char buf[BUFSIZE + 1];
string nextString() {
  scanf("%s", buf);
  return buf;
}
int main() {
  long long n, a, b, c;
  cin >> n >> a >> b >> c;
  if (a < b - c || n < b) {
    cout << n / a << endl;
    return 0;
  }
  long long k = (n - b) / (b - c) + 1;
  n -= k * (b - c);
  long long res = k + n / a;
  cout << res << endl;
  return 0;
}
