# coding=utf-8: c1 = str(input()) c2 = str(input()) cTotal = c1 + c2 cList = list() for i in range(len(cTotal)): cList.append(cTotal[i]) j = 0 hCount = 0 hCountList = list() for str in cList: if str == "o": hCount += 1 j += 1 if j == len(cList): hCountList.append(hCount) break elif str == "x": hCountList.append(hCount) hCount = 0 j += 1 hCountSet = set(hCountList) print(max(hCountSet))