Task: Program Execution
Input (English): 4009, U, 8481, 8105, K, X, 6317, c, W, q, 6469, p, w, 6311, B, 9629, 2161, 7583, p, q, a
Output (English): 12