#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 15;
long long l[maxn], r[maxn];
char s[maxn];
int main() {
  scanf("%s", s);
  int len = strlen(s);
  long long cnt = 0, tmp = 0;
  for (int i = 0; i < len; i++) {
    if (i - 1 >= 0 && s[i] == 'v' && s[i - 1] == 'v') {
      tmp++;
    }
    if (s[i] == 'o') {
      l[cnt++] = tmp;
    }
  }
  long long k = cnt;
  tmp = 0;
  for (int i = len - 1; i >= 0; i--) {
    if (i + 1 < len && s[i] == 'v' && s[i + 1] == 'v') {
      tmp++;
    }
    if (s[i] == 'o') {
      r[--cnt] = tmp;
    }
  }
  long long sum = 0;
  for (int i = 0; i < k; i++) {
    sum += l[i] * r[i];
  }
  cout << sum << endl;
  return 0;
}
