Task: Program Execution
Input (English): 14, 18, ['B', 'L', '6995', '345', '9207', '5961', '8941', '135', 'd', 'Q', '93', '2137', '4677', 'v', '217', '4215', '1651', '8389']
Output (English): 14472