C=list(input()+input()) tmp=0 _max=0 for i in C: if i=='x': tmp=0 else: tmp+=1; _max=max(_max,tmp) print(_max)