Task: Program Execution
Input (English): Q, 5613, v, 6129, 645, j, 6395, J
Output (English): 18782