Task: Program Execution
Input (English): 3965, N, K, M, t
Output (English): 3965