#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int c = 0;
  long long g = 0;
  vector<int> d;
  long long sum = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == 'v' and i != s.size() - 1) {
      c++;
    } else {
      if (i == s.size() - 1 and s[i] == 'v') {
        c++;
      }
      if (c > 1) {
        d.push_back(c - 1);
        sum += c - 1;
      }
      if (s[i] == 'o') {
        d.push_back(0);
      }
      c = 0;
    }
  }
  long long m = 0;
  for (int i = 0; i < d.size(); i++) {
    if (d[i] > 0) {
      m += d[i];
    } else {
      g += m * (sum - m);
    }
  }
  cout << g;
  return 0;
}
