Input: str = "aaabccddd" Output: 3 Following are sequence of operations: aaabccddd -> abccddd -> abddd -> abd Input: str = "aa" Output: 1