s = input() s += input() s = s.split("x") s = [len(i) for i in s] print(max(s))