Task: Program Execution
Input (English): r, 4665, m, 2539, b, g
Output (English): 18, 4665, 13, 2539, 2, 7