import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static int howManyGames(int p, int d, int m, int s) { int ans=0; int curr=p; while(s>=curr) { s-=curr; ans++; curr-=d; if(curr