Task: Program Execution
Input (English): 5987, R, 261, M, 9499, 1235, 9975, 1923, 6105, 8043, 7031, 6305, Y, 721, A, E, 9469
Output (English): 12