x1 = input() x2 = input() x = x1 + x2 ans = 0 n = 0 for i in range(14): if x[i] == 'o': n += 1 else: ans = max(ans,n) n = 0 print(ans)