#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 100;
int main() {
  string s;
  cin >> s;
  if (s.size() > 3) {
    vector<long long> f(s.size()), b(s.size());
    f[0] = 0;
    b[s.size() - 1] = 0;
    for (long long i = 1; i < s.size(); i++) {
      if (s[i] == 'v' && s[i - 1] == 'v')
        f[i] = f[i - 1] + 1;
      else
        f[i] = f[i - 1];
    }
    for (long long i = s.size() - 2; i >= 0; i--) {
      if (s[i] == 'v' && s[i + 1] == 'v')
        b[i] = b[i + 1] + 1;
      else
        b[i] = b[i + 1];
    }
    long long ans = 0;
    for (long long i = 0; i < s.size(); i++) {
      if (s[i] == 'o') ans += f[i] * b[i];
    }
    cout << ans;
  } else
    cout << 0;
}
