Task: Program Execution
Input (English): 2981, 387, D, v, 2295, Y, 2321, X, N, 3891, N, c, V, 1027, D, 1305
Output (English): 1, 2, 5, 7, 10, 14, 16