c[:7]=input() c[7:]=input() d,m=0,0 for i in range(14): if c[i]=='o': d+=1 m=max(m,d) elif c[i]=='x': d=0 print(m)