Task: Program Execution
Input (English): 5949, 9347, R, 715, 9773, 3365, G, R
Output (English): 5