#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int maxn = 100000 + 5;
const long double eps = 1e-6;
long double PI = acos((long double)(-1));
inline long long pre(long long x) { return max(0LL, x); }
long long n, a, b, c;
int main() {
  cin >> n >> a >> b >> c;
  if (a <= b - c)
    cout << n / a << endl;
  else
    cout << pre(n - c) / (b - c) + (n - pre(n - c) / (b - c) * (b - c)) / a
         << endl;
  return 0;
}
