#include #include #include using namespace std; int main() { int p, d, m, s; cin >> p >> d >> m >> s; int ans = 0; for (; s >= p; s -= p, p = max(m, p-d)) ans++; cout << ans; return 0; }