Task: Program Execution
Input (English): N, F, 2531, 3157, 2331, X
Output (English): 3