c,w = map(len,input().split('ccw')) if c >= w: print(w+1) else: print(c)