At two coal mines, miners' productivity depends directly on the diversity of food they consume.
Food arrives at the mines in boxes of three types: meat, fish, and bread (yes, if you played "Settlers II" ten years ago, you may feel nostalgic). When another food box arrives at a mine, the miners extract a certain amount of coal depending on the contents of this box and the previous two boxes (or fewer, if they have not yet received that many), as follows:
If all three (or fewer) boxes are of the same type, they extract one unit of coal;
If among these three (or fewer) boxes there are two types of food, they extract two units of coal;
If among these three boxes there are all three types of food, they extract three units of coal.
You know in advance the sequence in which the boxes will be delivered to the mining town. Your task is to distribute this sequence between the two mines so that the total amount of coal extracted is maximized.
Boxes cannot be postponed or divided: a box must be immediately sent to either the first mine or the second. The number of boxes sent to each mine can be arbitrary, even all boxes can be sent to one mine if it is more profitable. (By the way, if you become a civil servant in the future, you should not act in this way!)
The first line contains — the number of food boxes (1 \leq n \leq 100000). The second line contains a string of length , consisting of the characters , , and , denoting boxes of meat, fish, and bread, respectively, in the order the boxes are delivered.
Output a single number — the maximum amount of coal the miners can extract under these conditions.
Example 1