Task: Program Execution
Input (English): 8515, 8631, 4595, 3947, 2839, 4043, N, N, 1699, 2589, K, 4659
Output (English): 9