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