#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  stack<long long> w_num;
  long long a = s.size(), w = 0;
  for (int i = 0; i < a; i++) {
    if (s[i] == 'o') w_num.push(w);
    if (i >= 1 && s[i] == 'v' && s[i - 1] == 'v') w++;
  }
  long long x = 0;
  while (!w_num.empty()) {
    x += (w - w_num.top()) * w_num.top();
    w_num.pop();
  }
  cout << x << endl;
  return 0;
}
