#include #include #include #include #include #include #include int max(int a,int b){ if(a= p){ s -= p; p = max(p-d,m); ans++; } return ans; } int main() { int p; int d; int m; int s; scanf("%i %i %i %i", &p, &d, &m, &s); int answer = howManyGames(p, d, m, s); printf("%d\n", answer); return 0; }