#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
long long inf = 1e9 + 7;
long long modexp(long long base, long long power) {
  if (power == 0) return 1;
  if (power & 1) return base * modexp(base, power - 1) % inf;
  return modexp(base * base % inf, power / 2);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long t = 1;
  while (t--) {
    string s;
    cin >> s;
    deque<long long> b, c;
    long long temp = 0;
    long long flag = 0;
    for (long long i = 0; i < s.length(); i++) {
      if (s[i] == 'o') {
        b.push_back(temp);
        flag = 0;
      } else {
        if (flag == 0) {
          flag = 1;
        } else {
          temp++;
        }
      }
    }
    temp = 0;
    flag = 0;
    for (long long i = s.length() - 1; i >= 0; i--) {
      if (s[i] == 'o') {
        c.push_front(temp);
        flag = 0;
      } else {
        if (!flag)
          flag = 1;
        else
          temp++;
      }
    }
    long long ans = 0;
    for (long long i = 0; i < b.size(); i++) {
      ans += b[i] * c[i];
    }
    cout << ans;
  }
  return 0;
}
