#include <bits/stdc++.h>
char data[1000005];
int wc[1000005] = {0};
int main() {
  int i, lasto = -1, c = 0;
  long long l = 0, r = 0, ans = 0;
  scanf("%s", data);
  for (i = 0; data[i] != 0; i++) {
    if (data[i] == 'o') {
      if (i - lasto > 2)
        wc[c] = i - lasto - 2;
      else
        wc[c] = 0;
      r += wc[c++];
      lasto = i;
    }
  }
  if (i - lasto > 2)
    wc[c] = i - lasto - 2;
  else
    wc[c] = 0;
  r += wc[c++];
  for (i = 0; i < c - 1; i++) {
    l += wc[i];
    r -= wc[i];
    ans += l * r;
  }
  printf("%I64d", ans);
  return 0;
}
