// // main.cpp // 1 // // Created by anand kumar on 09/09/17. // Copyright © 2017 anand kumar. All rights reserved. // #include #include #include #include #include using namespace std; #define ll long long int main(int argc, const char * argv[]) { int p,d,m,s; cin>>p>>d>>m>>s; int coun=0; while(s>=p) {//cout<<"wh "; if(s>=p) { s-=p; coun++; } if(p-d>m) { p-=d; } else{ p=m; } } cout<