There are balls in a row. Exactly of them are blue, and the other are red.
In one operation, you may choose a red ball and a blue ball somewhere to its right, then remove both of them. The relative order of all remaining balls does not change.
Find the minimum number of operations required so that no red ball has a blue ball to its right. Equivalently, all remaining blue balls must be to the left of all remaining red balls.
B and exactly characters R.