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