#include #define IM INT_MAX #define LLM LLONG_MAX using namespace std; int main() { ios::sync_with_stdio(false);cin.tie(0); cout.tie(0); int p, d, m, s, cnt = 0; int x= 0; cin>>p>>d>>m>>s; while (1) { if (s-p>=0) { s -= p; x += p; cnt++; } else { break; } if (p-d