Task: Program Execution
Input (English): 5171, 4015, D, 9147, D, R, 6031, 6153
Output (English): 3, 5, 6