Task: Program Execution
Input (English): 1543, X, 5355, Z, A, 6887, 1285, z, M, N, 2897
Output (English): 6