Task: Program Execution
Input (English): w, d, 9499, Q, X
Output (English): 3