#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  long long int n;
  cin >> n;
  long long int a, b, c;
  cin >> a >> b >> c;
  long long int count = 0;
  if (a > b - c) {
    if (n >= b) count += ((n - b) / (b - c) + 1);
    n -= count * (b - c);
    if (n >= a) count += n / a;
  } else {
    count += n / a;
    n -= count * a;
    if (n >= b) count += ((n - b) / (b - c) + 1);
  }
  cout << count;
  return 0;
}
