Task: Program Execution
Input (English): 1017, 469, R, 5089, 5039, 7973
Output (English): 3