c = input() + input() c = c.split('x') print(len(max(c)))