1 VS 1#3784

1 VS 1

1 second
64 megabytes
Very easy

Alice and Bob are playing the game SanguoSha 1VS1. If Alice takes a card or use a card (it may be slash, missed, peach, duel, sabotage or theft and so on) or discard (sometimes she does not need to throw any card) we will write down an uppercase A, if Bob does this, of course, we will write down the letter B. Tell me the length of the longest operation combo performed by either player.

Input

There are several test cases, each test case contains only a string composed of uppercase A and B. The input will finish with the end of file. The length of the string is no more than .

Output

For each case, output an integer indicating the length.

Examples

Example 1

Loading
Loading