This is a Mooshak version of a CSES problem.


[PC001] Repetitions

You are given a DNA sequence: a string consisting of characters A, C, G, and T. Your task is to find the longest repetition in the sequence. This is a maximum-length substring containing only one type of character.

Input

The only input line contains a string of \(n\) characters.

Output

Print a line with one integer: the length of the longest repetition.

Constraints

Example Input Example Output
ATTCGGGA
3

Competitive Programming (CC3032) 2025/2026
DCC/FCUP - University of Porto