Task: Program Execution
Input (English): 3051, 5371, H, X, N, D, 281, v, N, 4987, 9799, 2831
Output (English): 6