#include <bits/stdc++.h>
using namespace std;
int gcd(int x, int y) {
  if (x == 0) return y;
  return gcd(y % x, x);
}
bool cmp(pair<int, int> a, pair<int, int> b) {
  if (a.first < b.first) return true;
  return false;
}
long long l[1000007];
long long r[1000007];
int main() {
  cin.sync_with_stdio(false);
  string s;
  cin >> s;
  memset(l, 0, sizeof(l));
  memset(r, 0, sizeof(r));
  for (int i = 1; i < s.size(); i++) {
    if (s[i] == 'v' && s[i - 1] == 'v')
      l[i] = l[i - 1] + 1;
    else
      l[i] = l[i - 1];
  }
  for (int i = s.size() - 2; i >= 0; i--) {
    if (s[i] == 'v' && s[i + 1] == 'v')
      r[i] = r[i + 1] + 1;
    else
      r[i] = r[i + 1];
  }
  long long ans = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == 'o') ans += (l[i] * r[i]);
  }
  cout << ans;
  return 0;
}
