Task: Program Execution
Input (English): J, 3717, Z, 1845, Y, 8505, 1225
Output (English): 4