Task: Program Execution
Input (English): 8355, a, 8107, 4427, G, X
Output (English): 3