#include <bits/stdc++.h>
using namespace std;
int pref[1000000], suff[1000000];
int main() {
  string s;
  cin >> s;
  unsigned long long combo = (s[0] == 'v');
  for (int i(1); i < s.size(); i++) {
    pref[i] = pref[i - 1];
    if (s[i] == 'v')
      combo++;
    else {
      if (combo > 1) pref[i] += combo - 1;
      combo = 0;
    }
  }
  combo = (s[s.size() - 1] == 'v');
  for (int i(s.size() - 2); i >= 0; i--) {
    suff[i] = suff[i + 1];
    if (s[i] == 'v')
      combo++;
    else {
      if (combo > 1) suff[i] += combo - 1;
      combo = 0;
    }
  }
  unsigned long long ans = 0;
  combo = 0;
  int p;
  for (int i(0); i < s.size(); i++) {
    if (s[i] == 'o') {
      if (!combo) p = i;
      combo++;
      continue;
    } else if (combo) {
      if (pref[p] && suff[i - 1])
        ans += (unsigned long long)pref[p] * (unsigned long long)suff[i - 1] *
               combo;
      combo = 0;
    }
  }
  cout << ans;
}
