Task: Program Execution
Input (English): 6995, W, 8381, D, 5497, J, K, K, i, 9579, H, 4067, 9743, Q, 7383, 3391, v, 8993, 1279, q, 2731, v, 6253
Output (English): 12