Task: Program Execution
Input (English): 4, 12, ['X', 'S', 'y', '5837', 'u', 'z', '4789', 'i', '7871', 'C', '4269', '7811']
Output (English): 30577