Task: Program Execution
Input (English): 4, 10, ['M', 'P', 'H', '123', 'O', 'l', 'e', 'Z', 'N', '4373', 'a', 'L', 'K', '4375', 'g', 'z', 'B', '2859', 'C', 'd', 'j', '4349', 'Q']
Output (English): 4496