Task: Program Execution
Input (English): 4, 17, ['855', 'J', 'M', '3991', '1075', 'G', 'R', '3641', '6669', '1985', 'p', '5173', 'd', 'q', '361', 'B', 'w', '6115']
Output (English): 22895