#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  string str;
  cin >> str;
  vector<long long> ft, bk;
  long long count = 0;
  char prev = 'o';
  for (auto in : str) {
    if (in == 'o') ft.push_back(count);
    if (in == 'v' && prev == 'v') count++;
    prev = in;
  }
  count = 0;
  char next = 'o';
  for (long long i = str.size() - 1; i >= 0; i--) {
    if (str[i] == 'o') bk.push_back(count);
    if (str[i] == 'v' && next == 'v') count++;
    next = str[i];
  }
  reverse(bk.begin(), bk.end());
  long long len = bk.size();
  long long ans = 0;
  for (long long i = 0; i < len; i++) {
    ans += ft[i] * bk[i];
  }
  cout << ans << "\n";
}
