Input: "baaaaa"
Output: 1
Explanation: The string without three identical consecutive letters which can be obtained is one move is "baabaa".
Example 2:
Input: "baaabbaabbba"
Output: 2
Explanation: There are four valid strings obtainable in two moves, for example "bbaabbaabbaa".
Example 3:
Input: "baabab"
Ouput: 0
Assumptions:
N is an integer within the range [0, ..200,000];
string S consists of only characteres a and b*