#include #include using namespace std; int main() { ios_base::sync_with_stdio( false ); cin.tie( nullptr ); int res = 0; int p, d, m, s; cin >> p >> d >> m >> s; while ( s - p >= 0 ) { ++res; s -= p; p -= d; if ( p < m ) p = m; } cout << res << '\n'; }