#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int fact(long long int n) {
  long long int res = 1;
  for (int i = 2; i <= n; ++i) {
    res *= i;
    res %= 1000000007;
  }
  return res;
}
long long int ar[500050];
long long int pref[1000006], suf[1000006];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int tc = 1;
  while (tc--) {
    long long int n, m, k;
    string s, t;
    cin >> s;
    n = s.size();
    for (int i = 1; i < n; i++) {
      if (s[i] == 'v' and s[i - 1] == 'v')
        pref[i] = pref[i - 1] + 1;
      else
        pref[i] = pref[i - 1];
    }
    for (int i = n - 2; i >= 0; i--) {
      if (s[i] == 'v' and s[i + 1] == 'v')
        suf[i] = suf[i + 1] + 1;
      else
        suf[i] = suf[i + 1];
    }
    long long int sum = 0;
    for (int i = 0; i < n; i++) {
      if (s[i] == 'o') sum += suf[i] * pref[i];
    }
    cout << sum << endl;
  }
  return 0;
}
