Task: Program Execution
Input (English): 2, 6, ['5057', 'x', '3401', '9251', '939', '8287', 'W', 'G', 'Q', 'X', 'J', '2117', 'J', 'N', '7813']
Output (English): 21878