Task: Program Execution
Input (English): 3, 17, ['1477', 'J', 'J', '3131', '531', '3207', '4677', 'W', 'K', '2015', '2771', 'Z', 'Q', 'k', '3847', 'C', 'R', '283', 'W']
Output (English): 20179