Task: Program Execution
Input (English): 5895, n, 3225, K, 8349, q, 5339, m, h, 6301, u
Output (English): 6