Task: Program Execution
Input (English): Q, V, 5739, 8621, 5741, r, 3381, w, 3353, 7485, 3141, N, 3977, 153, R, 8895
Output (English): 10