Task: Program Execution
Input (English): 5007, W, 5177, C, w, O, f, 6231, 8953, 7171, 3103, 4741, H
Output (English): 6