#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  getline(cin, str);
  long long int n = str.length();
  long long int arr[n];
  long long int prev = 0;
  arr[0] = 0;
  for (long long int i = 1; i < n; i++) {
    if (str[i] == 'v' && str[i - 1] == 'v') {
      arr[i] = prev + 1;
      prev = arr[i];
    } else {
      arr[i] = prev;
      prev = arr[i];
    }
  }
  long long int ans = 0;
  for (long long int i = 0; i < n; i++) {
    long long int curr = 0;
    if (str[i] == 'o' && (i >= 2 && i <= n - 3)) {
      curr = arr[i - 1] * (arr[n - 1] - arr[i - 1]);
    }
    ans += curr;
  }
  cout << ans;
  return 0;
}
