Task: Program Execution
Input (English): K, 277, s, 1333, 1051, 6145, U, T, W, a, O
Output (English): 7