#include <bits/stdc++.h>
using namespace std;
const long double Pi = 3.141592653;
const long long mod = 1e6 + 3;
class Graph {
  map<int, vector<int>> ma;

 public:
  void addedge(int n, int m) {
    ma[n].push_back(m);
    ma[m].push_back(n);
  }
};
int main() {
  long long n;
  cin >> n;
  long long a, b, c;
  cin >> a >> b >> c;
  long long plastic;
  if (a <= b - c and n >= a) {
    plastic = n / a;
    cout << plastic;
    return 0;
  }
  long long glass = (n - c) / (b - c);
  if (glass < 0) glass = 0;
  long long t = n - glass * (b - c);
  glass += (t / a);
  cout << glass;
  return 0;
}
