Task: Program Execution
Input (English): 9531, 6787, 8543, P
Output (English): 9531, 6787, 8543, 16