Task: Program Execution
Input (English): 4, 8, ['3915', '4345', '4913', '1091', '4107', 'A', 'R', 'A', '871', '5133', '6641', 'a', 'I', '3919', '8963', 'K', '3417']
Output (English): 5198