Task: Program Execution
Input (English): 7, 10, ['J', '9757', '7989', 'g', '4177', 'w', '4541', '1319', '5243', '6761', 'Q', '8783', '931', 'R', 'y', 't', 'P', '5115']
Output (English): 17864