Task: Program Execution
Input (English): J, 6827, 2017, m, 2987, V, 2381
Output (English): 4