Task: Program Execution
Input (English): p, 7715, 1593, 2747, 9115, 4117, M
Output (English): 1, 7