Task: Program Execution
Input (English): 3107, D, 9595, 8807, Q, o, T, N, A
Output (English): 21509