a = input() a += input() c = a.split("x") d = max(map(len, c)) print(d)