Task: Program Execution
Input (English): 1, 5, ['J', '6105', 'P', '8705', '3739']
Output (English): 18549