#include #include #include #include #include #include #include int howManyGames(int p, int d, int m, int s) { int A; A = (d*(s-p-m+1)+(p-m))/(m*d) -3; return A; } 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; }