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