# -*- coding: utf-8 -*- import re S = raw_input().decode("utf-8") sp1 = filter(None, re.split(u'w+', S)) sp2 = map(len, filter(None, re.split(u'[^w]+', S))) if len(sp1) == 0 or len(sp2) == 0: print '' exit() if S.startswith(u'w'): sp2.pop(0) if not S.endswith(u'w'): sp2.append(0) m = max(sp2)