Task: Program Execution
Input (English): B, q, 8743, 7311, K, O, q, 1357, 239
Output (English): 17650