#include int main() { int data[4]; int i = 0; int l; while (std::cin >> l) { data[i] = l; i++; } int vega = data[0]; int meet = data[1]; int levaledge = data[2]; int limit = data[3]; int r; for (r = 0; r <= vega; r++) { if ((r + r * levaledge) > limit) { if (r > 0) r--; std::cout << r << std::endl; break; } } std::cout << r << std::endl; }