Task: Program Execution
Input (English): 1, 4, ['F', '5405', '7927', '4115', '3065', '3195', '5847', 'X', '7609']
Output (English): 17447