Task: Program Execution
Input (English): 5059, 3361, k, 6861, J, J, L, 4091, x, g, K, T, 349, v, 6149, E, x
Output (English): 25870