Task: Program Execution
Input (English): 6057, 3743, n, M
Output (English): 9800