Task: Program Execution
Input (English): r, 5747, x, 3577, a, W, 3477, 1505, A, X, 8787, v, 2035, X, M, 467, 3807, 4717, b, 309, G, l, 4159, 6217
Output (English): 12