#include <bits/stdc++.h>
using namespace std;
int party[100];
int main() {
  string str;
  string str1;
  cin >> str;
  long long vnum = 0;
  long long wnum = 0;
  long long onum = 0;
  long long wonum = 0;
  long long wownum = 0;
  long long state = 0;
  for (int i = 1; i < str.size(); i++) {
    if (str[i] == 'v' && str[i - 1] == 'v') str1.push_back('w');
    if (str[i] == 'o') str1.push_back('o');
  }
  for (auto c : str1) {
    if (c == 'w') {
      wonum += (wnum * onum);
      onum = 0;
      vnum++;
      state = 0;
    }
    if (c == 'o') {
      onum++;
      wnum += vnum;
      wownum += vnum * wonum;
      vnum = 0;
      state = 1;
    }
  }
  if (state == 0) {
    wnum += vnum;
    wownum += vnum * wonum;
    vnum = 0;
  }
  cout << wownum << endl;
  return 0;
}
