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