C1 = input() C2 = input() C = (C1 + C2).split('x') y = 0 for i in C: x = i.count('o') y = max(x, y) print(y)