Task: Program Execution
Input (English): Q, 2271, 1803, 2363
Output (English): 6437