Task: Program Execution
Input (English): A, 9143, H, 3847, c, 9247, 2577, J, 6051, 8863, 9147, 8775
Output (English): 8