#include <bits/stdc++.h>
using namespace std;
long long temp = 0, r, s = 0, ans = 0, e, x, y, max1 = 0, m = 0, c = 0, t = 0,
          i, n, k, c1 = 0, tot = 0, t1, b, k4 = 0, c2 = 0, j = 0, k1, k2 = 0,
          k3 = 0;
char ch;
string s1, s2;
signed main() {
  cin >> s1;
  n = s1.length();
  vector<long long> v2(1000010, 0), v3(1000010, 0);
  for (long long i = 1; i < n; i++) {
    if (s1[i] == 'v' && s1[i - 1] == 'v')
      v2[i] = v2[i - 1] + 1;
    else
      v2[i] = v2[i - 1];
  }
  for (long long i = n - 1 - 1; i >= 0; i--) {
    if (s1[i] == 'v' && s1[i + 1] == 'v')
      v3[i] = v3[i + 1] + 1;
    else
      v3[i] = v3[i + 1];
  }
  for (long long i = 2; i < n - 2; i++) {
    if (s1[i] == 'o') ans += v2[i - 1] * v3[i + 1];
  }
  cout << ans;
}
