Task: Program Execution
Input (English): 3, 8, ['3547', 'p', '9493', '4395', '9711', '6633', '2585', '3557', 'M', 'U']
Output (English): 36374