Task: Program Execution
Input (English): 2, 15, ['8587', 'G', '759', 'm', '695', '4311', '7003', '1621', 'A', '9775', '4211', '8605', 'r', 'W', 'I']
Output (English): 36980