#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  cin >> s;
  vector<long long> w_sum(s.size());
  long long total_w;
  for (unsigned int i = 1; i < s.size(); i++) {
    w_sum[i] = w_sum[i - 1] + (s[i] == 'v' && s[i - 1] == 'v' ? 1 : 0);
  }
  total_w = w_sum[s.size() - 1];
  unsigned long long ans = 0;
  for (unsigned int i = 2; i < s.size(); i++) {
    if (s[i] == 'o') ans += w_sum[i] * (total_w - w_sum[i]);
  }
  cout << ans << endl;
  return 0;
}
