Task: Program Execution
Input (English): 3, 3, ['5819', '3317', '451', '5811']
Output (English): 154