Task: Program Execution
Input (English): Q, 1149, X, 6257, 7565, V, m, 9123
Output (English): 4