#include <bits/stdc++.h>
using namespace std;
bool compare(pair<pair<long long int, long long int>, long long int> p1,
             pair<pair<long long int, long long int>, long long int> p2) {
  return p1.first.first < p2.first.first;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int i, te, j, x, n, m, k, t, y, a, b, r;
  te = 1;
  while (te--) {
    string s;
    cin >> s;
    n = s.length();
    long long int a[n], c[n], ans = 0, cnt = 0, co = 0;
    for (i = 0; i < n; i++) {
      if (s[i] == 'o') co++;
      c[i] = co;
    }
    for (i = n - 1; i >= 0; i--) {
      if (s[i] == 'o') {
        ans += cnt;
      }
      if (s[i] == 'v' && s[i - 1] == 'v' && i >= 1) {
        cnt++;
      }
      a[i] = ans;
    }
    cnt = 0;
    for (i = 0; i <= n - 1; i++) {
      if (s[i] == 'v' && s[i + 1] == 'v') {
        cnt += a[i];
      }
    }
    cout << cnt << "\n";
  }
  return 0;
}
