#include <bits/stdc++.h>
using namespace std;
const int M = 1e9 + 7;
void darcarys() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
bool isprime(long long int a) {
  if (a == 1) return false;
  if (a == 2) return true;
  if (a % 2 == 0) return false;
  for (long long int i = 3; (i * i) <= a; i += 2) {
    if (a % i == 0) return false;
  }
  return true;
}
int dp[5000055];
string s;
string a = "";
int n;
signed main() {
  darcarys();
  int t = 1;
  while (t--) {
    cin >> s;
    int cnt = 0;
    memset(dp, -1, sizeof(dp));
    for (int i = 0; i < s.length(); i++) {
      if (s[i] == 'o') {
        a += 'o';
      } else {
        int j = i;
        cnt = 0;
        while (s[j] == 'v') {
          cnt += 1;
          j += 1;
          i += 1;
        }
        if (cnt == 1)
          a += 'v';
        else {
          for (int x = 1; x < cnt; x++) a += 'w';
        }
        i -= 1;
        cnt = 0;
      }
    }
    n = a.length();
    long long int w = 0;
    long long int wo = 0;
    long long int wow = 0;
    for (int i = 0; i < n; i++) {
      if (a[i] == 'w') {
        w += 1;
        wow += wo;
      }
      if (a[i] == 'o') wo += w;
    }
    cout << wow << endl;
  }
}
