#include using namespace std; int main() { int p; int d; int m; int s; cin >> p >> d >> m >> s; int c=0; while(1) { if(s