Imports System
Module Module1
    Sub Main()
        Dim str = Console.ReadLine()
        Dim sep = "BDEFHIJKLMNOPQRSUVWXYZ".ToCharArray()
        Dim separate = str.Split(sep, 10)
        Dim len As Integer = 0
        For Each item As String In separate
            If len < item.Length Then len = item.Length
        Next
        Console.WriteLine(len)
        Return
    End Sub
End Module