#include using namespace std; typedef int64_t ll; ll p,d,m,s; int main() { cin>>p>>d>>m>>s; ll no=0; ll spent=0; while(spent+p<=s) { spent+=p; no++; p-=d; if(p