# -*- coding: utf-8 -*- text = input() ccw_index = text.index('ccw') if ccw_index + 1 < len(text) - (ccw_index + 2): print(ccw_index + 1) else: print(len(text) - (ccw_index + 2))