# -*- coding: utf-8 -*- s = list(input()) findc = True findFW = False findSW = False first = 0 end = 0 ans = -1 for i in range(len(s)): if findc: if s[i] == "c": first = i findc = False findFW = True elif findFW: if s[i] == "w": findFW = False findSW = True elif findSW: if s[i] == "w": end = i findSW = False findc = True ans = max(ans,end-first+1) print(ans)