Task: Program Execution
Input (English): Q, O, 2649, 9627, K, 1397, 2667, e, 7117
Output (English): 23457