Task: Program Execution
Input (English): N, v, 5951, 6309, H, u
Output (English): 4