c1 = input() c2 = input() c = c1 + c2 m = 0 cnt=0 for a in c: if a == "x": cnt=0 else: cnt+=1 m = max(m,cnt) print(m)