Task: Program Execution
Input (English): n, 317, 7, x, 331, x, 313, s, b
Output (English): 1, 3, 7