Task: Program Execution
Input (English): M, F, 4477, 1565, 4407, r, v, 7237, 83, 5243, O, z, W, 7703, Q, i, 9657, n
Output (English): 40372