import re print(max([-1] + [len(i) for i in re.findall(r'c\w+w\w+w', input()) if i != []]))