s = input() t = input() x = s + t ans = 0 cnt = 0 for c in x: if c == 'o': cnt += 1 else: cnt = 0 if ans < cnt: ans = cnt ptint(ans)