Task: Program Execution
Input (English): n, R, A, N, 2731, p
Output (English): 2731