Task: Program Execution
Input (English): q, 345, 8039, 6371
Output (English): 3