Task: Program Execution
Input (English): X, 6915, 903, w, q, W, S, 7447, 1999, 1847, M, 1741
Output (English): 6