Task: Program Execution
Input (English): 3, 12, ['775', '299', '4887', '5575', 's', 'J', 'B', 'D', 'C', '5489', 'C', 'p', '6517']
Output (English): 15951