Task: Program Execution
Input (English): 2653, 5607, V, d, v, R, W, 3787
Output (English): 12047