#include <bits/stdc++.h>
using namespace std;
const long long MOD = (long long)1e9 + 7;
const long long N = (long long)1e5 * 4;
const long long INF = (long long)1e18;
const double eps = (double)1e-6;
string s;
vector<long long> v;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> s;
  long long cnt = 0, col = 0;
  s += 'a';
  bool ok = 0;
  for (long long i = 1; i < (long long)(s.size()); ++i) {
    if (s[i] == 'o') {
      col++;
    }
    if (s[i] == s[i - 1] && s[i] == 'v') {
      if (col != 0 && (long long)(v.size()) != 0) v.push_back(col);
      col = 0;
      cnt++;
    } else {
      if (cnt != 0) v.push_back(cnt);
      cnt = 0;
    }
  }
  long long sum = 0;
  for (long long i = 0; i < (long long)(v.size()); ++i) {
    if (i % 2 == 0) sum += v[i];
  }
  long long ans = 0;
  cnt = 0;
  for (long long i = 0; i < (long long)(v.size()); ++i) {
    if (i % 2 == 0) {
      cnt += v[i];
      sum -= v[i];
    } else {
      ans += (cnt * v[i]) * sum;
    }
  }
  cout << ans;
  return 0;
}
