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