#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  if (s.size() <= 2) {
    cout << "0";
    return 0;
  }
  string arr = "";
  int i = 0, j = 0;
  while (j < s.size() - 1) {
    if (s[j] == 'v' && s[j + 1] == 'v')
      j++;
    else {
      int vcount = 0;
      if (s[j - 1] == 'v' && s[j] == 'v') vcount = j - i;
      while (vcount--) arr += 'w';
      if (!(s[j - 1] == 'v' && s[j] == 'v')) arr += s[j];
      i = j + 1;
      j++;
    }
  }
  int vcount = 0;
  if (s[j - 1] == 'v' && s[j] == 'v') {
    vcount = j - i;
    while (vcount--) arr += 'w';
  } else
    arr += s[j];
  vector<long long> dp1(arr.size()), dp2(arr.size());
  long long count = 0;
  for (int i = arr.size() - 1; i >= 0; i--) {
    if (arr[i] == 'w') count++;
    dp1[i] = count;
  }
  count = 0;
  for (int i = 0; i < arr.size(); i++) {
    if (arr[i] == 'w') count++;
    dp2[i] = count;
  }
  long long sum = 0;
  for (int i = 0; i < arr.size(); i++) {
    if (arr[i] == 'o') sum += (dp1[i] * dp2[i]);
  }
  cout << sum;
  return 0;
}
