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