Task: Program Execution
Input (English): G, 7555, 87, a, 8849, 7859, D
Output (English): 1, 4, 7