Task: Program Execution
Input (English): D, 3699, 8731, H
Output (English): 2