Task: Program Execution
Input (English): 7047, f, 4741, m, 8991, 3543, d, a, Q, 3317
Output (English): 5