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