Task: Program Execution
Input (English): 2609, 8593, X, 365, 8173, 1859, 4371, M, 7949, O, D
Output (English): 2609, 8593, 24, 365, 8173, 1859, 4371, 13, 7949, 15, 4