print(min(map(len,input().split('ccw')))+1)