s=input() w='cww' l=[] p=[] for i,j in enumerate(s): if j in w: l+=[j] l=l[-3:] p+=[i] p=p[-3:] if ''.join(l)==w: break print(max(p)-min(p)+1)