Task: Program Execution
Input (English): E, n, m, w, M, v, 9645, 7603, 7843, 2493, z
Output (English): 4