Task: Program Execution
Input (English): n, k, 4619, 1541, 971, E, S, 4263, 7577, 5169, A, 147, 5387, 2097, 2337, 8539, 6451, 8059, 6729
Output (English): 5