#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  cin >> s;
  long long l = s.length();
  vector<long long>::iterator it1, it2;
  vector<long long> indexW, indexO;
  long long w = 0, o = 0;
  long long wow = 0;
  for (long long i = 0; i < l - 1; i++) {
    if (s[i] == 'v' && s[i + 1] == 'v') {
      indexW.push_back(i);
      w++;
    } else if (s[i] == 'o') {
      indexO.push_back(i);
      o++;
    }
  }
  it1 = indexW.begin();
  if (w == 0)
    cout << "0\n";
  else {
    for (long long i = 0; i < o; i++) {
      long long index = indexO[i];
      it2 = lower_bound(indexW.begin(), indexW.end(), index);
      if (it2 - it1 <= w) wow += ((long long)(it2 - it1)) * (w - (it2 - it1));
    }
    cout << wow << "\n";
  }
  return 0;
}
