import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String S = sc.next(); char[] charS = S.toCharArray(); int cnt = 0; for(int i = 0; i < S.length(); i++) { if(charS[i] == 'c') { for(int j = i + 1; j < S.length(); j++) { if(charS[j] == 'w') { for(int k = j + 1; k < S.length(); k++) { if(charS[k] == 'w') { cnt++; } } } } } } System.out.println(cnt); } }