Task: Program Execution
Input (English): 5, 11, ['p', '8697', '4741', 'S', '2799', '8041', 'E', '5391', 'j', 'b', '8719', 'E', 't', '2955', '8995', 'n', 'w', 'l', 'h', 's', '8245']
Output (English): 24950