#include <bits/stdc++.h>
using namespace std;
long long dp[1000000 + 50];
long long dp2[1000000 + 50];
vector<pair<long long, long long> > bc;
int main() {
  ios::sync_with_stdio(false);
  string str;
  cin >> str;
  long long start = -1LL, cnt = 0;
  for (long long i = 0; i < str.length(); i++) {
    if (str[i] == 'v') {
      if (start == -1LL) {
        start = i;
        cnt = 1LL;
      } else {
        cnt++;
      }
    } else {
      if (cnt > 0) {
        bc.push_back(make_pair(start, cnt));
      }
      start = -1LL;
      cnt = 0;
    }
  }
  if (start != -1LL) {
    bc.push_back(make_pair(start, cnt));
  }
  long long li = bc.size();
  long long ans = 0;
  dp[li + 1] = 0;
  dp[li + 2] = 0;
  for (long long i = li - 1; i >= 0; i--) {
    dp[i] = dp[i + 1LL] + bc[i].second - 1LL;
  }
  for (int i = 0; i < li; i++) {
    if (i == 0) {
      dp2[i] = bc[i].second - 1;
    } else {
      dp2[i] = bc[i].second - 1 + dp2[i - 1];
    }
  }
  for (long long i = 0; i < li - 1LL; i++) {
    ans = ans + (dp2[i]) * (bc[i + 1LL].first - (bc[i].first + bc[i].second)) *
                    (dp[i + 1LL]);
  }
  cout << ans;
  return 0;
}
