Task: Program Execution
Input (English): i, M, R, 5265, Q, 29, P, 8701, p, j, 6357, r, 3663, g, O, 5901, 627, 9109, U, 2617, 9139, Q
Output (English): 12