Task: Program Execution
Input (English): 6905, m, W, R, 7109, n, J, 6147, R, r, i, 745
Output (English): 20906