#include <bits/stdc++.h>
int main(void) {
  char str[1 << 20];
  scanf("%1000000s", str);
  std::vector<long long> os;
  long long cur = 0;
  for (int it = 1; str[it]; ++it) {
    if (str[it] == 'v' && str[it - 1] == str[it])
      ++cur;
    else if (str[it] == 'o')
      os.push_back(cur);
  }
  long long res = 0;
  for (auto el : os) res += el * (cur - el);
  std::cout << res << "\n";
  return 0;
}
