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) { // Return the number of games you can buy int[] arr=new int[100]; int sum=0; arr[0]=p; int i=1; if(p==s){ System.out.println("1"); } else { if(p>d&&p>m){ int count=0; while(true){ p=p-d; count++; i++; for(int j=0;j