Task: Program Execution
Input (English): 1581, 4617, x, 4987, 8597
Output (English): 19782