Task: Program Execution
Input (English): n, v, i, d, N, R, 5629, 4913
Output (English): 10542