#include using namespace std; int main() { int p,d,m,s; cin >> p >> d >> m >> s; int output = 0; while (true) { s -= p; p = max(p-d,m); if (s >= 0) output++; else break; } cout << output; }