#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  string s;
  cin >> s;
  long long int ans = 0;
  long long int cnt = 0;
  long long int cur = 0;
  long long int m = 0;
  for (int i = 0; i < (int)s.length(); i++) {
    if (s[i] == 'v') {
      cnt++;
    } else {
      if (cnt) m += (cnt - 1);
      cnt = 0;
    }
  }
  if (cnt) m += (cnt - 1);
  cnt = 0;
  long long int c = 0;
  for (int i = 0; i < (int)s.length(); i++) {
    if (s[i] == 'v') {
      cur++;
    }
    if (s[i] == 'o') {
      if (cur) c += (cur - 1);
      cur = 0;
      ans += c * (m - c);
    }
  }
  cout << ans << "\n";
  return 0;
}
