Task: Program Execution
Input (English): 7809, Q, 7185
Output (English): 2