Task: Program Execution
Input (English): 8931, N, 713, 2645, 4689, 6129
Output (English): 23107