Task: Program Execution
Input (English): i, M, 1571, 4627, 6565, 5571, N, 7857, v, D, B
Output (English): 6