#include using namespace std; #define D(x) cout << #x << " = " << x << endl int main() { int p, d, m, s, ans = 0; cin >> p >> d >> m >> s; while(s >= 0) { s -= p; ans++; p -= d; if(p <= m) p = m; } cout << ans - 1 << endl; return 0; }