Task: Program Execution
Input (English): 3, 4, ['M', '8727', '2485', 'M']
Output (English): 2485