Task: Program Execution
Input (English): 3, 21, ['3849', 'C', '7257', 's', 'A', '6253', 'd', '3813', 'i', 'B', '4227', '2071', '2595', '7317', '5647', '9563', '6975', 'b', 'h', '1653', '2371']
Output (English): 59742