#include <bits/stdc++.h>
using namespace std;
const long long int inf = 1e18, M = 1e9 + 7;
void solve() {
  string s;
  cin >> s;
  long long int n = s.length();
  vector<long long int> pre(n, 0), suf(n, 0);
  long long int sum = 0;
  for (long long int i = 1; i < n; ++i) {
    if (s[i] == 'v' && s[i - 1] == 'v') ++sum;
    pre[i] = sum;
  }
  sum = 0ll;
  for (long long int i = n - 2; i >= 0; --i) {
    if (s[i] == 'v' && s[i + 1] == 'v') ++sum;
    suf[i] = sum;
  }
  long long int ans = 0;
  for (long long int i = 0; i < n; ++i) {
    if (s[i] == 'o') ans += pre[i] * suf[i];
  }
  cout << ans;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
