Task: Program Execution
Input (English): 5, 10, ['851', 'm', 'q', '8227', '3167', '8511', '7135', '2073', '641', '889', 'n']
Output (English): 22416