a = input() b = input() c = a+b lc = c.split("x") ls = [] for i in lc: ls += len(i) print(max(ls))