C = str(input()) + str(input()) m, t = 0, 0 for c in C: if c == 'o': t += 1 if t > m: m = t else: t = 0 print(m)