t=input() c='ccw' l=r=0 while c in t: a=t.index(c) b=t[::-1].index(c[::-1]) if a