holidays = "".join([y for x in range(2) for y in input()]).split("x") days_off = max(map(len,holidays)) print(days_off)