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