Task: Program Execution
Input (English): 5159, Q, 8949
Output (English): 2