a = input() b = input() t = a+b cnt=0 mx =0 for i in t: if i == 'o': cnt += 1 mx = max(cnt, mx) else: cnt=0 print(mx)