Russian scientists are working on several promising topics. One of them is the quality of laugh. In this research they analyse the human speech and extract the laugh from it.
The scientists already made the software which converts speech to text. They consider a string of alternating letters “h” and “a” to be a laugh. For example, strings “ahahaha”, “hah” and “a” are laughs, but “abacaba” and “hh” are not.
You are given a string s containing the text. Find the length of the longest substring which is considered a laugh.