Task: Program Execution
Input (English): 9787, 1491, 4411, 5261, U, 9787, b
Output (English): 30737