Task: Program Execution
Input (English): n, N, p, 4443, 5731, v, 2919, X, B, a, 947
Output (English): 14, 14, 16, 4443, 5731, 22, 2919, 24, 2, 1, 947