#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long n, a, b, c;
  cin >> n >> a >> b >> c;
  long long cont = 0ll;
  if (n < b) {
    cout << n / a << '\n';
    return 0;
  }
  if (a < b - c) {
    cout << n / a << '\n';
    return 0;
  }
  n -= b;
  long long sol = (n / (b - c));
  n = n % (b - c);
  n += b;
  sol++;
  n -= (b - c);
  sol += (n / a);
  cout << sol << '\n';
}
