Task: Program Execution
Input (English): V, 151, 5309, 1181, 3343, 4475
Output (English): 5