l=input()+input() n,m =0,0 for i in l: if i=="x": n = 0 else: n +=1 if n > m: m =n print(m)