Task: Program Execution
Input (English): x, K, 1303, 2765, 8237, 31, 1831, 35
Output (English): 2