#include <bits/stdc++.h>
using namespace std;
const int N = 1004;
const int SQUARE = 1;
const int LINE = 2;
const int ERASE = 0;
const int NONE = -1;
long long n, a, b, c;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> a >> b >> c;
  long long res = 0;
  if (b - c < a && n >= b) {
    res += (n - b) / (b - c);
    n -= (n - b) / (b - c) * (b - c);
  }
  while (b - c <= a && n >= b) {
    res += 1;
    n -= b;
    n += c;
  }
  res += n / a;
  n -= n / a * a;
  cout << res << endl;
  return 0;
}
