Task: Program Execution
Input (English): i, 5831, 2745, 413, 1513, 5489, n, 3001, 3201, X, 9321, 3909, 4999, r
Output (English): 40422