Task: Program Execution
Input (English): c, q, m, M, 501, 5851, k, 973, g, i, z, M, J, W, O, 2299, C, 9701, 839, E
Output (English): 20164