Task: Program Execution
Input (English): R, Q, 1607, 977, 8335, W, f, 4255, J, 6757, s, 9375, 6661
Output (English): 37967