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