Task: Program Execution
Input (English): 1975, M, 5027, 5705, 4737
Output (English): 2