c=input()+input() r=1 if c[0]=='o' else 0 m=0 for i in c[1:]: r=r+1 if i=='o' else 0 m=max(m,r) print(m)