#include <bits/stdc++.h>
using namespace std;
const int maxN = (int)1e6 + 7;
char s[maxN];
long long a[maxN], b[maxN], c[maxN];
int p, q;
long long sum, ans;
int main() {
  scanf("%s", s + 1);
  int n = strlen(s + 1);
  memset(a, 0, sizeof(a));
  p = 0;
  q = 1;
  while (q <= n) {
    if (s[q] == 'o') {
      q++;
    } else
      break;
  }
  int state = 1;
  int cnt = 0;
  int last = 0;
  while (q <= n) {
    if (state) {
      last = 0;
      cnt = 0;
      while (s[q] == 'v') {
        q++;
        cnt++;
      }
      state = 1 - state;
      if (cnt > 1) {
        a[++p] = cnt - 1;
        last = 1;
      }
    } else {
      cnt = 0;
      while (s[q] == 'o') {
        q++;
        cnt++;
      }
      state = 1 - state;
      if (last)
        a[++p] += cnt;
      else
        a[p] += cnt;
    }
  }
  if (p % 2 == 0) p--;
  sum = 0;
  long long sum2 = 0;
  for (int i = 1; i <= p; i += 2) {
    sum += a[i];
  }
  for (int i = 1; i <= p; i += 2) {
    sum2 += a[i];
    c[i] = sum2;
    b[i] = (sum - sum2) * a[i + 1];
  }
  ans = 0;
  for (int i = 1; i <= p; i += 2) {
    ans += c[i] * b[i];
  }
  printf("%lld\n", ans);
}
