#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18;
const long double eps = 1e-6;
const long long maxn = 1e6 + 1;
long long dpp[maxn], dps[maxn];
signed main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  string s;
  cin >> s;
  long long n = (long long)s.size();
  long long cp = (s[0] == 'v'), cs = (s[n - 1] == 'v'), val = 0;
  for (long long i = 1; i < n; ++i) {
    if (s[i] == 'o') {
      val = dpp[i - 1];
      cp = 0;
    } else {
      ++cp;
    }
    dpp[i] = val + max((long long)0, cp - 1);
  }
  val = 0;
  for (long long i = n - 2; i >= 0; --i) {
    if (s[i] == 'o') {
      val = dps[i + 1];
      cs = 0;
    } else {
      ++cs;
    }
    dps[i] = val + max((long long)0, cs - 1);
  }
  long long ans = 0;
  for (long long i = 1; i < n - 1; ++i) {
    if (s[i] == 'o') {
      ans += dpp[i - 1] * dps[i + 1];
    }
  }
  cout << ans;
  return 0;
}
