Task: Program Execution
Input (English): 5331, 1083, 3081, r, 9117, 1157, m, 6195, a, 3335, 5743, f, F, X, B, 6315, 3081, 3449, f, S
Output (English): 47887