#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  string s1;
  bool t = false;
  for (auto c : s) {
    if (c == 'v') {
      if (t) {
        s1 += 'w';
      } else {
        t = true;
      }
    } else {
      t = false;
      s1 += 'o';
    }
  }
  vector<int> a(s1.size() + 1, 0);
  vector<int> b(s1.size() + 1, 0);
  for (size_t i = 0; i < s1.size(); i++) {
    a[i + 1] = a[i] + (s1[i] == 'w');
  }
  for (int i = (int)s1.size() - 1; i >= 0; i--) {
    b[i] = b[i + 1] + (s1[i] == 'w');
  }
  long long ans = 0;
  for (size_t i = 0; i < s1.size(); i++) {
    if (s1[i] == 'o') {
      ans += (long long)a[i] * b[i + 1];
    }
  }
  cout << ans << endl;
  return 0;
}
