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