Task: Program Execution
Input (English): X, 8773, G, 1407, 2715, J, N
Output (English): 4