Task: Program Execution
Input (English): 1, 3, ['X', '9109', '8635', 'M']
Output (English): 17744