#include <bits/stdc++.h>
using namespace std;
int dir[4][2] = {1, 0, -1, 0, 0, 1, 0, -1};
const int maxn = 3000005;
long long pre[maxn], suf[maxn];
int main() {
  string s;
  cin >> s;
  long long ans = 0;
  for (int i = 0; i < s.length(); i++) {
    pre[i] += pre[i - 1];
    if (i >= 1 && s[i] == 'v' && s[i - 1] == 'v') pre[i]++;
  }
  for (int i = s.length() - 2; i >= 0; i--) {
    suf[i] += suf[i + 1];
    if (s[i + 1] == 'v' && s[i] == 'v') suf[i]++;
  }
  for (int i = 0; i < s.length(); i++)
    if (s[i] == 'o') ans += 1ll * pre[i] * suf[i];
  printf("%I64d\n", ans);
  return 0;
}
