C = input().strip() + input().strip() tmp = 0 m = 0 for i in C: if i == 'x': if m < tmp: m = tmp tmp = 0 else: tmp += 1 else: if m < tmp: m = tmp print(str(m))