Task: Program Execution
Input (English): 5, 5, ['343', '8723', '3187', 'S', '5573', 'M', '7183', '1617', 'q', '5093', 'I', 'c']
Output (English): 3755