Task: Program Execution
Input (English): q, 241, q, 461, p
Output (English): 1, 2, 4, 6