#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  string s;
  cin >> s;
  long long a = 0, b = 0, c = 0;
  for (long long i = 0; i < s.size(); i++) {
    if (s[i] == 'o') {
      b += a;
    } else if (i > 0 && s[i] == 'v' && s[i - 1] == 'v') {
      a++;
      c += b;
    }
  }
  cout << c << "\n";
  return 0;
}
