L=list(input()) T=list(input()) L+=T G=0 i=0 while i <14: if L[i]=="o": C=0 while L[i]=="o" and i<14: C+=1 i+=1 if C>G: G=C i+=1 print (G)