#include <bits/stdc++.h>
using namespace std;
long long n, a, b, c, ans;
int main() {
  cin >> n >> a >> b >> c;
  if (n >= b)
    ans = (n - ((n - b) / (b - c) + 1) * (b - c)) / a + (n - b) / (b - c) + 1;
  cout << max(n / a, ans);
}
