#include <bits/stdc++.h>
using namespace std;
template <typename T>
T gcd(T a, T b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long isPowerof2(long long x) { return (x && !(x & x - 1)); }
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ostream_iterator<long long> output(cout, " ");
  string second;
  cin >> second;
  long long n = second.size();
  vector<char> vec;
  long long v = 0;
  for (long long(i) = (0); i < (n); i++) {
    if (second[i] == 'v') {
      v++;
    } else if (second[i] == 'o') {
      for (long long(j) = (0); j < (v - 1); j++) {
        vec.emplace_back('w');
      }
      v = 0;
      vec.emplace_back('o');
    }
  }
  for (long long x = 0; x < (v - 1); x++) {
    vec.emplace_back('w');
  }
  long long tot = 0;
  for (long long(i) = (0); i < (vec.size()); i++) {
    if (vec[i] == 'w') tot++;
  }
  long long ans = 0;
  long long cnt = 0;
  for (long long(i) = (0); i < (vec.size()); i++) {
    if (vec[i] == 'w')
      cnt++;
    else {
      ans += (cnt * (tot - cnt));
    }
  }
  cout << ans;
  return 0;
}
