#include <bits/stdc++.h>
using namespace std;
const int MOD = 998244353;
string s;
int main() {
  cin >> s;
  string x = "";
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == 'v') {
      int j = i;
      int cnt = 0;
      while (s[j] == 'v') cnt++, j++;
      i = j - 1;
      for (int k = 0; k < cnt - 1; k++) x += 'w';
    } else
      x += 'o';
  }
  long long ans = 0;
  long long m = 0;
  long long w = 0;
  for (int i = 0; i < x.size(); i++) {
    if (x[i] == 'w')
      ans += m, w++;
    else
      m += w;
  }
  cout << ans << endl;
}
