C = input() + input() x = [0] * 14 i = 0 f = True for c in C: if c == 'x': if f: i += 1 f = False elif c == 'o': x[i] += 1 f = True print(max(x))