Task: Program Execution
Input (English): 2513, 251, x, K, t, J
Output (English): 2764