Task: Program Execution
Input (English): M, 1589, 8353, X, P, 3173, V, 1335, m, l, 6421, 4823, r, 8941, 4255, 9107, z, 2449, 2321, l
Output (English): 52767