#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  long long n, a, b, c;
  cin >> n >> a >> b >> c;
  long long ans, ans1, ans2;
  ans1 = max(n - c, 0ll) / (b - c);
  ans1 = ans1 + ((n - ans1 * (b - c)) / a);
  ans = max(n / a, ans1);
  cout << ans;
  return 0;
}
