Task: Program Execution
Input (English): N, 4731, 2087, t, g
Output (English): 14, 4731, 2087, 20, 7