#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  string h;
  cin >> h;
  long long dp[h.size()];
  long long vco = 0;
  for (int i = 0; i < h.size() - 1; i++) {
    if (h[i] == h[i + 1] && h[i] == 'v') {
      vco++;
    }
    dp[i] = vco;
  }
  vco = 0;
  long long ans = 0;
  for (int i = h.size() - 1; i > 0; i--) {
    if (h[i] == 'o') {
      ans += dp[i] * vco;
    }
    if (h[i] == h[i - 1] && h[i] == 'v') {
      vco++;
    }
  }
  cout << ans << "\n";
  return 0;
}
