#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1e6 + 100;
long long dp1[MAX_N], dp2[MAX_N];
long long ans = 0;
string s;
int n;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> s;
  n = (int)s.size();
  dp1[0] = 0;
  for (int i = 1; i < n; i++) {
    dp1[i] = dp1[i - 1];
    if (s[i] == 'v' && s[i - 1] == 'v') dp1[i]++;
  }
  dp2[0] = 0;
  for (int i = n - 2; i >= 0; i--) {
    dp2[i] = dp2[i + 1];
    if (s[i + 1] == 'v' && s[i] == 'v') dp2[i]++;
  }
  for (int i = 1; i < n - 1; i++) {
    if (s[i] == 'o') {
      long long now = dp1[i - 1] * dp2[i + 1];
      ans += now;
    }
  }
  cout << ans << endl;
  return 0;
}
