Task: Program Execution
Input (English): V, u, 1617, 973, v, 109, p, R, 6871, 2823, 7019, 9757, 925, g
Output (English): 30094