Task: Program Execution
Input (English): n, 385, 71, v, q, p
Output (English): 1, 3, 5, 7, 8