c=input() cc=input() c+=cc cnt=0 ans=0 for i in range(14): if c[i]=="o": cnt+=1 else: ans=max(ans,cnt) cnt=0 print(max(ans,cnt))