Task: Program Execution
Input (English): 2, 18, ['w', '8995', 'g', '8909', 'F', '2955', 'h', 'i', '4245', 'v', 's', '3281', '357', 'V', '3557', '4091', 'O', 'v', '2905', '5865', 'c', '9879']
Output (English): 36390