Task: Program Execution
Input (English): f, m, 1335, f, n, 3507, 8643, O, 6533
Output (English): 20018