#coding: utf-8 #yuki_203 s1=raw_input() s2=raw_input() s=s1+s2 cnt=0 temp=0 for i in xrange(len(s)): if s[i]=="o": temp+=1 if temp>cnt: cnt=temp elif s[i]=="x": temp=0 print cnt