Task: Program Execution
Input (English): 7, 8, ['2985', 'R', 'C', 'J', '2599', 'W', '3311', '339', '5827', '6211', 'F', '115', '5899', '7801', '7263', 'D', 'B', 'Q', 'N']
Output (English): 3650