#include <bits/stdc++.h>
using namespace std;
bool sBs(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.second < b.second);
}
long long SUMD(long long n);
long long BS(vector<long long> &PS, long long s, long long e, long long ser);
long long MI(long long a, long long m);
bool P[100000LL + 1];
void Sieve(int n = 100000LL);
long long Powb(long long b, long long n);
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long q = 1;
  while (q--) {
    long long b, w, n, m, k, t, i, j;
    string s;
    cin >> s;
    n = s.size();
    long long W = 0, O = 0;
    long long ans = 0;
    for (i = 0; i < n; i++) {
      if (s[i] == 'v' and i > 0 and s[i - 1] == 'v') {
        W++;
        ans += O;
      } else if (s[i] == 'o') {
        O += W;
      }
    }
    cout << ans << "\n";
  }
  return 0;
}
long long Powb(long long b, long long n) {
  if (n == 0) return 1LL;
  if (n == 1) return b;
  long long temp = Powb(b, n / 2);
  if (n % 2 == 0) {
    return (temp * temp) % 1000000007;
  } else {
    return (b * ((temp * temp) % 1000000007)) % 1000000007;
  }
}
long long SUMD(long long n) {
  long long sum = 0;
  while (n > 0) {
    sum += n % 10;
    n = n / 10;
  }
  return sum;
}
long long BS(vector<long long> &PS, long long s, long long e, long long ser) {
  if (s > e) return s;
  long long mid = (s + e) / 2;
  if (PS[mid] == ser) {
    return mid;
  } else if (PS[mid] > ser) {
    return BS(PS, s, mid - 1, ser);
  } else
    return BS(PS, mid + 1, e, ser);
}
long long MI(long long a, long long m) {
  long long m0 = m;
  long long y = 0, x = 1;
  if (m == 1) return 0;
  while (a > 1) {
    long long q = a / m;
    long long t = m;
    m = a % m, a = t;
    t = y;
    y = x - q * y;
    x = t;
  }
  if (x < 0) x += m0;
  return x;
}
void Sieve(int n) {
  memset(P, true, sizeof(P));
  P[0] = false;
  P[1] = false;
  for (long long i = 2; i * i <= n; i++) {
    if (P[i]) {
      for (long long j = i * i; j <= n; j += i) {
        P[j] = false;
      }
    }
  }
}
