Task: Program Execution
Input (English): 4, 8, ['B', 'g', '2197', 'E', '9255', '4123', '4023', '7415', 'X', '8167', 'd', 'l', 'a', '181']
Output (English): 24816