Task: Program Execution
Input (English): 35, q, p, 351, n, 441, 441, 457
Output (English): 1, 3, 4, 5, 7