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