#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  cout << setprecision(20) << fixed;
  long long t = 1;
  while (t--) {
    string s;
    cin >> s;
    if (s.size() < 5)
      cout << 0 << endl;
    else {
      vector<long long> v1(s.size());
      vector<long long> v2(s.size());
      v1[0] = 0;
      v2[s.size() - 1] = 0;
      long long ans = 0;
      for (long long i = 1; i < s.size(); i++) {
        if (s[i] == s[i - 1] && s[i] == 'v') {
          v1[i] = v1[i - 1] + 1;
        } else
          v1[i] = v1[i - 1];
      }
      for (long long i = s.size() - 2; i >= 0; i--) {
        if (s[i] == s[i + 1] && s[i] == 'v') {
          v2[i] = v2[i + 1] + 1;
        } else
          v2[i] = v2[i + 1];
      }
      for (long long i = 0; i < s.size(); i++) {
        if (s[i] == 'o') ans += v1[i] * v2[i];
      }
      cout << ans << endl;
    }
  }
  return 0;
}
