#include <bits/stdc++.h>
using namespace std;
bool debug = 0;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int tc = 1;
  while (tc--) {
    string s;
    cin >> s;
    int n = s.length();
    long long dpv[n], dpvr[n];
    long long ans = 0;
    dpv[0] = 0;
    for (int i = 1; i < n; i++) {
      if (s[i] == 'v' && s[i - 1] == 'v') {
        dpv[i] = dpv[i - 1] + 1;
      } else {
        dpv[i] = dpv[i - 1];
      }
    }
    dpvr[n - 1] = 0;
    for (int i = n - 2; i >= 0; i--) {
      if (s[i] == 'v' && s[i + 1] == 'v')
        dpvr[i] = dpvr[i + 1] + 1;
      else
        dpvr[i] = dpvr[i + 1];
    }
    for (int i = 0; i < n; i++) {
      if (s[i] == 'o') {
        ans += dpv[i] * dpvr[i];
      }
    }
    cout << ans;
  }
  return 0;
}
