#include <iostream>
using namespace std;
int main() {
string S;
cin>>S;
int count1=1;
int maxCount=1;
for(int i=0;i<S.length()-1;i++)
{
if(S[i] == S[i+1])
{
count1++;
if(maxCount < count1)
{
maxCount=count1;
}
}
else
{
count1=1;
}
}
cout<<maxCount<<endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CgkKCXN0cmluZyBTOwoJY2luPj5TOwoJCglpbnQgY291bnQxPTE7CglpbnQgbWF4Q291bnQ9MTsKCWZvcihpbnQgaT0wO2k8Uy5sZW5ndGgoKS0xO2krKykKCXsKCQlpZihTW2ldID09IFNbaSsxXSkKCQl7CgkJCWNvdW50MSsrOwoJCQlpZihtYXhDb3VudCA8IGNvdW50MSkKCQkJewoJCQkJbWF4Q291bnQ9Y291bnQxOwoJCQl9CgkJfQoJCWVsc2UKCQl7CgkJCWNvdW50MT0xOwoJCX0KCX0KCQoJY291dDw8bWF4Q291bnQ8PGVuZGw7CgkKCXJldHVybiAwOwp9