S = input() T = input() A = S+T ans = 0 cnt = 0 for i in range(14) : if A[i] == "x" : ans = max(ans,cnt) cnt = 0 else : cnt += 1 ans = max(ans,cnt) print(ans)