#include using namespace std; void howManyGames2(int p, int d, int m, int s) { // Return the number of games you can buy int count = 1; s = s - p; int check = (p-m)/d; int intm = p*check - d*(check*(check+1))/2; } int howManyGames(int p, int d, int m, int s) { // Return the number of games you can buy int count = 0; if(s < p) return 0; count++; s=s-p; // cout<m && s>0) { //cout<0) { // cout<> p >> d >> m >> s; int answer = howManyGames(p, d, m, s); cout << answer << endl; return 0; }