S = input() + input() L = [] c = 0 for s in S: if s == "x": L.append(c) c = 0 else: c += 1 L.append(c) print(max(L))