#include <bits/stdc++.h>
using namespace std;
int main(void) {
  long long n, a, b, c;
  cin >> n;
  cin >> a;
  cin >> b;
  cin >> c;
  long long vol = 0;
  while (n >= a or n >= b) {
    if (a < n and b < n) {
      if (a == b) {
        if (n > 100000 and n - b >= b - c) {
          vol = vol + (n - b) / (b - c);
          n = (n - b) % (b - c) + b;
        } else {
          vol++;
          n = n - b + c;
        }
      }
      if (a < b) {
        if (a >= b - c) {
          if (n > 100000 and n - b >= b - c) {
            vol = vol + (n - b) / (b - c);
            n = (n - b) % (b - c) + b;
          } else {
            vol++;
            n = n - b + c;
          }
        }
        if (a < b - c) {
          vol = vol + n / a;
          n = n % a;
        }
      }
      if (a > b) {
        if (n > 100000 and n - b >= b - c) {
          vol = vol + (n - b) / (b - c);
          n = (n - b) % (b - c) + b;
        } else {
          vol++;
          n = n - b + c;
        }
      }
    }
    if (a < n and b == n) {
      if (a >= b - c) {
        vol++;
        n = n - b + c;
      }
      if (a < b - c) {
        vol++;
        n = n - a;
      }
    }
    if (a < n and b > n) {
      vol = vol + n / a;
      n = n % a;
    }
    if (a == n and b < n) {
      if (n > 100000 and n - b >= b - c) {
        vol = vol + (n - b) / (b - c);
        n = (n - b) % (b - c) + b;
      } else {
        vol++;
        n = n - b + c;
      }
    }
    if (a == n and b == n) {
      vol++;
      n = 0;
    }
    if (a == n and b > n) {
      vol++;
      n = 0;
    }
    if (a > n and b < n) {
      if (n > 100000 and n - b >= b - c) {
        vol = vol + (n - b) / (b - c);
        n = (n - b) % (b - c) + b;
      } else {
        vol++;
        n = n - b + c;
      }
    }
    if (a > n and b == n) {
      if (n > 100000 and n - b >= b - c) {
        vol = vol + (n - b) / (b - c);
        n = (n - b) % (b - c) + b;
      } else {
        vol++;
        n = n - b + c;
      }
    }
  }
  cout << vol << endl;
}
