CSES - Shared codeLink to this code: https://cses.fi/paste/00595193ac050c88ab83e/
#3
lst=list(input())
count=1
maxx=1
for i in range(1,len(lst)):
    if lst[i]==lst[i-1]:
        count+=1
    else:
        count=1
    if count>maxx:
        maxx=count
print(maxx)