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