Task: Program Execution
Input (English): 3, 5, ['7121', '9963', '4701', '5829', '8217']
Output (English): 18747