Task: Program Execution
Input (English): O, 1439, q, r, 9059, U, 8149
Output (English): 18647