Task: Program Execution
Input (English): 2, 5, ['c', '1799', '3077', 't', 'R']
Output (English): 4876