Task: Program Execution
Input (English): g, 3931, M, 911, x, u, U, 2831, J, 2217, V, f
Output (English): 4