#include <bits/stdc++.h>
using namespace std;
long long int mod = 1000000007;
int gcd(long long int a, long long int b) {
  return (b % a == 0) ? a : gcd(b - a * (b / a), a);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int i, j = 1, k = 1, n, a = n, b = -1;
  string s;
  cin >> s;
  n = s.length();
  for (i = 0; i < n; i++) {
    if (s[i] == 'v') {
      a = i;
      break;
    }
  }
  for (i = n - 1; i >= 0; i--) {
    if (s[i] == 'v') {
      b = i;
      break;
    }
  }
  vector<long long int> v1, v2;
  for (i = a; i <= b - 1; i++) {
    if (s[i] == s[i + 1] && s[i] == 'v') {
      j++;
    } else if (s[i] == s[i + 1] && s[i] == 'o') {
      k++;
    } else if (s[i] == 'v' && s[i + 1] == 'o') {
      v1.push_back(j - 1);
      j = 1;
    } else if (s[i] == 'o' && s[i + 1] == 'v') {
      v2.push_back(k);
      k = 1;
    }
  }
  v1.push_back(j - 1);
  long long int pref[v1.size()], suff[v1.size()];
  long long int ans = 0, ans1 = 0;
  for (i = 0; i < v1.size(); i++) {
    ans += v1[i];
    pref[i] = ans;
  }
  for (i = v1.size() - 1; i >= 0; i--) {
    ans1 += v1[i];
    suff[i] = ans1;
  }
  long long int sum = 0;
  for (i = 0; i < v2.size(); i++) {
    sum += pref[i] * v2[i] * suff[i + 1];
  }
  cout << sum;
  return 0;
}
