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