s = input() + input() count = 0 res = 0 for c in s: if c == "o": count += 1 else: res = max(res, count) count = 0 print(max(res, count))