C1,C2=input(),input() C=C1+C2 count=0 max_count=0 for i in C: if i=="o": count+=1 max_count=max(max_count,count) else: count=0 print(max_count)