#include using namespace std; using namespace std::chrono; #define rep(i,a,b) for(int i = a;i<(b);++i) #define trav(a,v) for(auto& a : v) #define all(x) x.begin(), x.end() #define sz(x) (int)(x).size() typedef long long ll; typedef long double ld; typedef pair pii; typedef vector vi; ll big = 1000000007ll; ll big2 = 1000000009ll; ll n,m,k,q,w,h,x,y; int main() { // freopen("input.txt","r",stdin); //freopen("autput.txt","w",stdout); ll a,b,c,d,e; ll s,p; cin >> p >> d >> m >> s; ll ans = 0; while(s >= p){ ans++; s -= p; p -= d; p = max(p,m); } cout << ans << "\n"; return 0; }