#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  vector<long long int> wcounts;
  long long int siz = s.size();
  long long int w[siz];
  long long int numofw = 0;
  memset(w, 0, sizeof(w));
  long long int sucw[siz];
  memset(sucw, 0, sizeof(sucw));
  long long int o = 0;
  for (long long int i = 0; i < siz; i++) {
    if (s[i] == 'v') {
      long long int num = 0;
      while (s[i] == 'v') {
        i++;
        num++;
      }
      sucw[o] += num - 1;
      numofw += num - 1;
      w[o] = numofw;
    }
    if (s[i] == 'o') {
      o++;
    }
  }
  long long int sumws[siz];
  memset(sumws, 0, sizeof(sumws));
  sumws[0] = sucw[0];
  long long int lastind = 0;
  for (long long int i = 1; i < siz; i++) {
    sumws[i] = sumws[i - 1] + sucw[i];
    if (sucw[i] != 0) lastind = i;
  }
  long long int wows = 0;
  long long int pre, post;
  for (long long int i = 0; i < siz; i++) {
    pre = sumws[i];
    post = sumws[lastind] - sumws[i];
    wows += pre * post;
  }
  cout << wows << "\n";
}
