Task: Program Execution
Input (English): V, 1547, 399, 2881, 8423, 4165, 2677, V, 4667, A, 241
Output (English): 8