Task: Program Execution
Input (English): N, R, 6971, 7645, 4799, e, 5433, 3865, e, 6027, 6759, 173
Output (English): 41672