#include #include #include #include #include using namespace std; #define sz(x) (int)(x.size()) #define fr(i,a,b) for(int i=a;i=a;--i) #define mp make_pair #define pb push_back typedef long long ll; typedef pair pii; typedef pair pll; ///////////////// void solve(){ int p, d, m, s; cin >> p >> d >> m >> s; int ans = 0; while(s >= p){ s -= p; ++ans; p -= d; p = max(p, m); } cout << ans << endl; } int main(){ #ifdef _DEBUG freopen("input.txt","r",stdin); freopen("output.txt","w",stdout); #endif solve(); return 0; }