#include <bits/stdc++.h>
const int INF = 0x3f3f3f3f;
const int N = 1e6 + 5;
using namespace std;
int t = 0, n, m, s = 0, k = 1;
int vis[N] = {0};
char ss[N] = {0};
long long sum = 0;
int main() {
  scanf("%s", ss + 1);
  int len = strlen(ss + 1);
  for (int i = 1; i < len + 1; i++) {
    if (ss[i] == 'v' && ss[i - 1] == 'v') {
      vis[i] = vis[i - 1] + 1;
    } else
      vis[i] = vis[i - 1];
  }
  for (int i = 1; i < len + 1; i++) {
    if (ss[i] == 'o') sum += 1ll * (vis[len] - vis[i]) * vis[i];
  }
  printf("%lld\n", sum);
  return 0;
}
