#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
template <class T>
void printImpl(const vector<T>& coll) {
  copy(coll.begin(), coll.end(), ostream_iterator<T>(cout, " "));
  cout << endl;
}
template <class T, int N>
void printImpl(T (&coll)[N]) {
  copy(coll, coll + N, ostream_iterator<T>(cout, " "));
  cout << endl;
}
template <class Key, class Value>
void printImpl(const map<Key, Value>& data) {
  typename map<Key, Value>::const_iterator it;
  for (it = data.begin(); it != data.end(); ++it) {
    cout << it->first << ":" << it->second << endl;
  }
}
template <class T>
void printImpl(const T& data) {
  cout << data << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  long long n, a, b, c;
  cin >> n >> a >> b >> c;
  if (a < b - c || n < b) {
    cout << n / a << endl;
    return 0;
  }
  long long bCount = (n - b) / (b - c) + 1;
  long long aCount = (n - bCount * (b - c)) / a;
  cout << aCount + bCount << endl;
  return 0;
}
