Task: Program Execution
Input (English): R, N, M
Output (English): 3