Task: Program Execution
Input (English): 4367, 617, q
Output (English): 4984