m = input()+input() m = m.split("x") m.sort() m.reverse() print(m[0].count("o"))