Task: Program Execution
Input (English): 9415, J, 6501, M
Output (English): 15916