#include <bits/stdc++.h>
using namespace std;
const long long N = 1e6 + 5;
long long dp1[N], dp2[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string a;
  cin >> a;
  long long len = a.size();
  for (long long i = 1; i < len; i++) {
    dp1[i] = dp1[i - 1];
    if (a[i - 1] == 'v' && a[i] == 'v') dp1[i]++;
  }
  for (long long i = len - 2; i >= 0; i--) {
    dp2[i] = dp2[i + 1];
    if (a[i] == 'v' && a[i + 1] == 'v') dp2[i]++;
  }
  long long ans = 0;
  for (long long i = 0; i < len; i++) {
    if (a[i] == 'o') ans += dp1[i] * dp2[i];
  }
  cout << ans << endl;
  return 0;
}
