Task: Program Execution
Input (English): N, 7463, D, S, 8811, 6495, 7519, D, 8735, W
Output (English): 14, 7463, 4, 19, 8811, 6495, 7519, 4, 8735, 23