#include #include using namespace std; using ll = long long; int main() { int a, b, c, d, ans = 0; cin >> a >> b >> c >> d; if(b < c){ cout << 0 << endl; } else if(1 + c > d){ cout << 0 << endl; } else { while(a > 0 && b >= c){ ans++; b -= c; a--; } cout << ans << endl; } }