using System; namespace Yuki { class Program { static void Main(string[] args) { string s = Console.ReadLine(); int w = 0; int wc = 0; int a = 0; for (int i = s.Length - 1; i >= 0; i--) { if (s[i] == 'w') { w++; wc += w - 1; } else if (s[i] == 'c') { a += wc; } } Console.WriteLine(a); } } }