Task: Program Execution
Input (English): 4653, N, Q, j, a
Output (English): 4