Joisino has a lot of red and blue bricks and a large box. She will build a tower of these bricks in the following manner.
First, she will pick a total of $N$ bricks and put them into the box. Here, there may be any number of bricks of each color in the box, as long as there are $N$ bricks in total. Particularly, there may be zero red bricks or zero blue bricks. Then, she will repeat an operation $M$ times, which consists of the following three steps: