Олимпиадный тренинг

Задача 24760. Laughter, and more!


Задача

Темы:
Kolobok loves to laugh a lot. To prepare for a potential enemy, Fox decides to study his laugh.

Fox believes that laughter — it is a sequence of alternating letters "a"; and "h". So for example, "ahahaha", "hah" and "a" are laughter, and "abacaba" and "hh" — no.

Gingerbread man speaks very quickly, so all his words merge into one big one. For research, Fox wants to know how long he can laugh. It has the string — recording of Kolobok's conversation. Fox wants to know the longest laugh in this conversation.

Fox asks you to help her with this task.

Input file format
The first line of the input file contains one natural number n (1 ≤ n ≤ 105 ) — the length of the line with the conversation of the kolobok. The second line contains a string of lowercase Latin letters of length n — recording of the kolobok conversation.

Output file format
In the output file print a single number — the longest laugh in Kolobok's conversation

Enter Output
5
ahaha
5
24
ahahrunawayahahsofasthah
4
10
ahahaahaha
5