Task: Program Execution
Input (English): 6771, 6451, G, D, 5849, 2537, 4515, 3635, Q
Output (English): 6771, 6451, 7, 4, 5849, 2537, 4515, 3635, 17