Pancakes
Boy Pete decided to prepare her mother a birthday present - a festive breakfast. He decided to make a delicious tea and bake pancakes. Unfortunately, not distinguished by outstanding culinary skills, Peter was unable to keep up with pancakes. Each of them has turned out burnt on one side and underdone on the other. As a result, N Petit turned black and white pancakes. All the pancakes he put on a large plate on each other. Now Peter wants to turn them so that they were light-up - Peter thinks that because they liked my mother. To flip the pancakes he had a shovel, which he may take a few top pancakes (from one to the whole stack) and turn them all together (so that the top pancake will be in place from the bottom made of pancakes).
For the minimum number of such actions Pete could turn all the pancakes light side up?
Input
The first line of the input file is given a number N (1 ≤ N ≤ 100000) - the number of pancakes. Next N lines are described in the pancakes, top to bottom. If the i-th row is the symbol W, then the i-th pancake is underdone side up, and if B, then the burnt side up.
Output
The output file output a single number - the number of rolling over, which should make Peter to put all the pancakes underdone side up.