Task: Program Execution
Input (English): 1223, m, 6117, X, 5149, C, 6959
Output (English): 19448