Task: Program Execution
Input (English): M, K, 1963, 5683, 2115, 4645, 3687
Output (English): 3, 4, 5, 6, 7