#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 1;
long long n, m, k, l, x, y, z, cnt, ans, sum, mx, mn = -1e18;
long long a[N];
string s, t;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == 'o') {
      if (cnt) ans += cnt - 1;
      k += ans;
      cnt = 0;
    } else if (s[i] == 'v') {
      cnt++;
      if (cnt > 1) sum += k;
    }
  }
  cout << sum;
}
