Task: Program Execution
Input (English): M, d, G, 9113, 8739, 4235, 7517
Output (English): 3