Task: Program Execution
Input (English): 5787, 5289, 2849, 7471, 8253, 6071, p, w, U, 9317, 9469, 3467, Z, 5987, 295, 9571, 2527
Output (English): 13