#include <bits/stdc++.h>
using namespace std;
const long long MOD = (long long)1e9 + 7;
const long double PI = 3.141592653589793238462643383279502884197;
priority_queue<int, vector<int>, greater<int> > pq;
vector<int> v;
char s[1000001];
long long dp[1000000][4];
int n;
long long go(int o, int st) {
  if (o == n) return st == 3;
  if (dp[o][st] != -1) return dp[o][st];
  long long ret = 0;
  ret += go(o + 1, st);
  if (st == 1) {
    if (s[o] == 'o') ret += go(o + 1, 2);
  } else if (st != 3) {
    if (o < n - 1 && s[o] == 'v' && s[o + 1] == 'v') ret += go(o + 2, st + 1);
  }
  return dp[o][st] = ret;
}
int main() {
  memset(dp, -1, sizeof(dp));
  scanf("%s", s);
  n = strlen(s);
  printf("%lld", go(0, 0));
}
