# -*- coding: utf-8 -*- c1 = list(input()) c2 = list(input()) c = c1 + c2 vonus = False start = 0 end = 0 maxvacant = 0 c = c + ["x"] for i in range(len(c)): if c[i] == "o": if vonus == True: pass else: vonus = True start = i if c[i] == "x": if vonus == True: vonus = False end = i maxvacant = max(maxvacant,end-start) print(c) print(maxvacant)