#include <bits/stdc++.h>
unsigned long long a[1000000];
unsigned long long b[1000000];
int main() {
  std::string s;
  std::cin >> s;
  int n = s.size();
  int k = 2;
  for (int i = 1; i < n; i++) {
    if (s[i] == s[i - 1])
      a[k]++;
    else {
      k++;
      if (s[i] == 'v') a[k] += a[k - 2];
    }
  }
  int h = k;
  for (int i = n - 2; i >= 0; i--) {
    if (s[i] == s[i + 1])
      b[h]++;
    else {
      h--;
      if (s[i] == 'v') b[h] += b[h + 2];
    }
  }
  unsigned long long sum = 0;
  for (int i = 2 * (s[0] == 'o') + 3 * (s[0] == 'v'); i <= k; i += 2)
    sum += a[i - 1] * (a[i] + 1) * b[i + 1];
  std::cout << sum;
  return 0;
}
