#include <bits/stdc++.h>
using namespace std;
long long s[1000100];
long long s2[1000100];
int main() {
  string x;
  cin >> x;
  for (int i = 0; i < x.size() - 1; i++) {
    if (i > 0) s[i] = s[i - 1];
    if (x[i] == 'v' && x[i + 1] == 'v') s[i]++;
  }
  for (int i = x.size() - 1; i >= 1; i--) {
    s2[i] = s2[i + 1];
    if (x[i] == 'v' && x[i - 1] == 'v') s2[i]++;
  }
  long long sum = 0;
  for (int i = 1; i < x.size() - 1; i++) {
    if (x[i] == 'o') sum += s2[i + 1] * s[i - 1];
  }
  cout << sum;
  return 0;
}
