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