Task: Program Execution
Input (English): c, 5709, M, B, D, a, e, 5251, r, 5911, 3327, B, 7191, 7107, J, 7257, 4531, 5507, 6617, 3429
Output (English): 61837