#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long long N = 1e6 + 1;
long long pre[N], sub[N];
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  string str;
  cin >> str;
  long long len = str.size();
  pre[0] = 0;
  for (long long i = 1; i < len; i++) {
    pre[i] = pre[i - 1];
    if (str[i] == 'v' && str[i - 1] == 'v') pre[i]++;
  }
  long long net = pre[len - 1];
  long long ans = 0;
  for (long long i = 0; i < len; i++) {
    if (str[i] == 'o') ans += pre[i - 1] * (net - pre[i]);
  }
  cout << ans << "\n";
}
