Task: Program Execution
Input (English): Q, 8317, 8989
Output (English): 17306