Task: Program Execution
Input (English): r, k, W, 6621, p
Output (English): 18, 11, 23, 6621, 16