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