Task: Program Execution
Input (English): 2, 5, ['8407', '1329', '2243', '2547', '5371', '6023', '7139', 'K', '339', '3301', '6771', 'Z', '9983', '17', 'V']
Output (English): 11490