Task: Program Execution
Input (English): 2935, 5425, q, M
Output (English): 2