Task: Program Execution
Input (English): 5, 6, ['b', 'P', '7199', '9131', '4987', '3063', '987', 'r', '9281', 'z', 'P', '7627']
Output (English): 8050