Task: Program Execution
Input (English): B, 3001, 8677, 1391, 5843, 4903, 3947, 941, G, 5605
Output (English): 2