cww_str = ['c', 'w', 'w'] input_str = raw_input() cww_counter = 0 result = 0 for i in range(len(input_str)): if cww_str[cww_counter] == input_str[i]: cww_counter += 1 if cww_counter == 3: result = i + 1 break if cww_counter == 3 : print(result) else: print(-1)