Task: Program Execution
Input (English): K, 3919, X, C, x, a, x, d, 581
Output (English): 4500