Task: Program Execution
Input (English): Q, s, 8559, 6825, P
Output (English): 17, 19, 8559, 6825, 16