Task: Program Execution
Input (English): 3, 5, ['5145', '4227', '2283', '8425', '6305', 'X', 'o', 'a', 'R', 'J', 'a', '1829']
Output (English): 17013