Task: Program Execution
Input (English): 4617, k, 1487, A
Output (English): 6104