贪心
#include <cstdio>
int main()
{
__int64 n, a, b, c;
scanf("%I64d%I64d%I64d%I64d",&n, &a, &b, &c);
__int64 res = 0;
if (n >= b && b - c <= a)
{
res = (n - b) / (b - c) + 1;
}
printf("%I64d\n", res + (n - res * (b - c)) / a);
return 0;
}