#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  cin >> str;
  string nstr;
  vector<long long int> pre;
  for (long long int i = 1; i < str.size(); ++i) {
    if (str[i] == 'o')
      nstr.push_back(str[i]);
    else if (str[i] == 'v' && str[i - 1] == 'v')
      nstr.push_back('w');
  }
  long long int presum[nstr.size()];
  fill_n(presum, nstr.size(), 0);
  if (nstr[0] == 'w') presum[0] = 1;
  for (long long int i = 1; i < nstr.size(); ++i) {
    if (nstr[i] == 'w')
      presum[i] = presum[i - 1] + 1;
    else
      presum[i] = presum[i - 1];
  }
  long long int ans = 0;
  for (long long int i = 0; i < nstr.size(); ++i) {
    if (nstr[i] == 'o') {
      ans += presum[i] * (presum[nstr.size() - 1] - presum[i]);
    }
  }
  cout << ans;
  return 0;
}
