#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(NULL);
  cout.tie(NULL);
  ios_base::sync_with_stdio(false);
  string s;
  cin >> s;
  long long tw = 0, v = 0, o = 0, sum = 0;
  vector<long long> dp;
  for (int i = 0; i < s.size() - 1; i++) {
    if (tw == 0 && s[i] == 'o') continue;
    if (s[i] == 'v' && s[i + 1] == 'v') {
      v++;
      if (o != 0) {
        dp.push_back(o);
        o = 0;
      }
      tw++;
      continue;
    }
    if (s[i] == 'o') {
      o++;
      if (v != 0) {
        dp.push_back(v);
        v = 0;
      }
    }
  }
  v = 0;
  for (int i = 0; i < dp.size(); i++) {
    if (i % 2 == 0) {
      v += dp[i];
      tw -= dp[i];
      continue;
    }
    sum += (v * tw * dp[i]);
  }
  cout << sum;
  return 0;
}
