Task: Program Execution
Input (English): 8359, 2745, A, 9847, N, N, 2471, V
Output (English): 4