W1 = input() W2 = input() def solve(str1, str2): maxh = 0 cstr = str1 + str2 for i in range(len(cstr)): if cstr[i] == "o": temp = 1 for j in range(i+1, len(cstr)): if cstr[j] == "x": break else: temp += 1 if maxh < temp: maxh = temp return maxh solve print(solve(W1, W2))