Task: Program Execution
Input (English): 4, 15, ['9251', '3817', '7945', '8873', 'P', '829', '8951', '5379', '9785', 'i', '8217', '2295', 'j', '1179', '5129']
Output (English): 50637