Task: Program Execution
Input (English): B, K, 9399, t, 5541, w, 1939, 7841, q
Output (English): 24720