Task: Program Execution
Input (English): 8627, Y, 1407, 5303, A, X
Output (English): 15337