A=input().split('ccw') print(min(len(A[0]),len(A[1]))+1)