Task: Program Execution
Input (English): X, J, P, 4111, 4629, K, 9751
Output (English): 4