L = str(input()) L += str(input()) c = 0 for n in range(15): if 'o'*n in ''.join(L): c = n print(c)