#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1000000007;
long long int powermod(long long int _a, long long int _b,
                       long long int _m = mod) {
  long long int _r = 1;
  while (_b) {
    if (_b % 2 == 1) _r = (_r * _a) % _m;
    _b /= 2;
    _a = (_a * _a) % _m;
  }
  return _r;
}
long long int add(long long int a, long long int b, long long int m = mod) {
  long long int x = a + b;
  while (x >= m) x -= m;
  return x;
}
long long int sub(long long int a, long long int b, long long int m = mod) {
  long long int x = a - b;
  while (x < 0) x += m;
  return x;
}
long long int mul(long long int a, long long int b, long long int m = mod) {
  return ((a % m) * (b % m)) % m;
}
long long int gcd(long long int a, long long int b) {
  while (a && b) a > b ? a %= b : b %= a;
  return a + b;
}
long long int lcm(long long int a, long long int b) {
  return (max(a, b) / gcd(a, b)) * min(a, b);
}
const int N = 1000010;
string second;
int n, suf[N];
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  cin >> second;
  n = second.size();
  second = '-' + second;
  int vs = (second[n] == 'v') ? 1 : 0;
  suf[n] = 0;
  for (int i = n - 1; i >= 1; i--) {
    suf[i] = suf[i + 1];
    if (second[i] == 'o')
      vs = 0;
    else {
      vs++;
      if (vs >= 2) suf[i]++;
    }
  }
  int pre = 0;
  long long int ans = 0;
  vs = (second[1] == 'v') ? 1 : 0;
  for (int i = 2; i <= n; i++) {
    if (second[i] == 'o') {
      ans += pre * 1ll * suf[i];
      vs = 0;
    } else {
      vs++;
      if (vs >= 2) pre++;
    }
  }
  cout << ans;
  return 0;
}
