Task: Program Execution
Input (English): n, V, 7845, 5349, 5431, 8559
Output (English): 3, 4, 5, 6