Task: Program Execution
Input (English): R, h, N, 6713, 1881, 7713, 4659, 413
Output (English): 21379