#include <bits/stdc++.h>
using namespace std;
long long BinSearch(vector<long long> a, long long n, long long key) {
  long long l = 0, r = n - 1, mid;
  while (r - l > 1) {
    mid = (r + l) / 2;
    if (a[mid] < key) {
      l = mid + 1;
    } else {
      if (a[mid] > key) {
        r = mid - 1;
      } else {
        return mid;
      }
    }
  }
  return -1;
}
int main() {
  unsigned long long n, a, b, c, ans = 0;
  cin >> n >> a >> b >> c;
  if (a <= b - c) {
    cout << n / a;
    return 0;
  } else {
    if (n >= b) {
      ans += (n - c) / (b - c);
      n -= ans * (b - c);
    }
    if (n >= a) {
      ans += n / a;
    }
  }
  cout << ans << endl;
  return 0;
}
