Task: Program Execution
Input (English): 3899, 8503, q, M, 1605, 7385
Output (English): 3, 4