#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  vector<char> v;
  vector<long long int> w;
  long long int countw = 0, sum = 0;
  for (long long int i = 0; i < s.length(); i++) {
    if (s[i] == 'v' && s[i + 1] == 'v') {
      v.push_back('w');
      countw++;
    } else {
      v.push_back(s[i]);
    }
    if (s[i] == 'o') {
      w.push_back(countw);
    }
  }
  for (long long int i = 0; i < w.size(); i++) {
    sum += w[i] * (countw - w[i]);
  }
  cout << sum;
}
