c1 = input() c2 = input() c = c1 + c2 ret = 0 for l in list(c.split('x')): ret = max(ret, len(l)) print(ret)