#include <bits/stdc++.h>
using namespace std;
const int oo = (int)1e9;
const long long OO = 1e18;
void Suhaib_Sawalha() {
  string s;
  cin >> s;
  int fin = s.find("vv");
  if (fin == -1) {
    cout << 0;
    return;
  }
  s.erase(0, fin);
  fin = s.rfind("vv");
  if (fin == -1) {
    cout << 0;
    return;
  }
  s.erase(fin + 2, s.size() - 1);
  long long counter(0);
  for (int i = 0; i < s.size() - 1; ++i)
    if (s.substr(i, 2) == "vv") counter++;
  long long f = 0, l = counter, ans(0);
  for (int i = 0; i < s.size() - 1; ++i) {
    if (s.substr(i, 2) == "vv") f++, l--;
    if (s[i] == 'o') ans += (f * l);
  }
  cout << ans;
}
void Suhaib_Sawalha1() {
  long long t;
  cin >> t;
  while (t--) {
    Suhaib_Sawalha();
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  Suhaib_Sawalha();
  return 0;
}
