Task: Program Execution
Input (English): 9659, 4901, 313, S, 1913, V, X, 2683, 6817, 4223, 167
Output (English): 30676