Task: Program Execution
Input (English): M, v, 2843, 3727, 5181
Output (English): 2