#include <bits/stdc++.h>
using namespace std;
int main() {
  char s[1000005];
  scanf("%s", s);
  int len = strlen(s);
  int num = 0, num1 = 0;
  for (int i = 1; i < len; i++) {
    if (s[i] == 'v' && s[i - 1] == 'v') {
      num++;
    }
  }
  long long ans = 0;
  for (int i = 1; i < len; i++) {
    if (s[i] == 'v' && s[i - 1] == 'v') {
      num1++;
    } else if (s[i] == 'o') {
      ans += (long long)num1 * (num - num1);
    }
  }
  printf("%lld\n", ans);
  return 0;
}
