Task: Program Execution
Input (English): 5161, S, 53, 1743, 2821, 507, F, F, G, 3587, s
Output (English): 5