Task: Program Execution
Input (English): 1, 14, ['A', '333', '1909', '5079', '6603', 'w', 'U', '8043', '4761', '1565', '4865', 'p', '5855', '1075', '5531', '2987']
Output (English): 40088