Task: Program Execution
Input (English): D, M, 9017, C
Output (English): 3