Task: Program Execution
Input (English): q, 8155, L, v, 2657, X, v, 2353, 151, R, 967, 4327
Output (English): 18610