#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int n = s.length(), w = 0;
  for (int i = 1; i < n; i++)
    if (s[i] == 'v' && s[i - 1] == 'v') w++;
  long long ans = 0, c = 0;
  for (int i = 1; i < n; i++) {
    if (s[i] == 'o') {
      ans += (c * (w - c));
    } else if (s[i] == 'v' && s[i - 1] == 'v') {
      c++;
    }
  }
  cout << ans << endl;
  return 0;
}
