#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  string s;
  cin >> s;
  long long n = s.size();
  vector<long long> front(n);
  vector<long long> back(n);
  for (long long i = 1; i < n; i++) {
    if (s[i] == 'v' && s[i - 1] == 'v')
      front[i] = front[i - 1] + 1;
    else
      front[i] = front[i - 1];
  }
  for (long long i = n - 2; i >= 0; i--) {
    if (s[i] == 'v' && s[i + 1] == 'v')
      back[i] = back[i + 1] + 1;
    else
      back[i] = back[i + 1];
  }
  long long ans = 0;
  for (long long i = 0; i < n; i++) {
    if (s[i] == 'o') {
      ans += (long long)(front[i] * back[i]);
    }
  }
  cout << ans << "\n";
  return 0;
}
