#include <bits/stdc++.h>
using namespace std;
const long long int INF = 1e9 + 7;
void solve() {
  long long int ans = 0;
  string str;
  cin >> str;
  long long int len = str.length();
  vector<long long int> dp1(1000006, 0);
  dp1[0] = 0;
  for (int i = 1; i < len; i++) {
    if (str[i] == str[i - 1] && str[i] == 'v') {
      dp1[i] = dp1[i - 1] + 1;
    } else {
      dp1[i] = dp1[i - 1];
    }
  }
  vector<long long int> dp2(1000005, 0);
  for (int i = len - 2; i >= 0; i--) {
    if (str[i] == str[i + 1] && str[i] == 'v') {
      dp2[i] = dp2[i + 1] + 1;
    } else {
      dp2[i] = dp2[i + 1];
    }
  }
  for (int i = 0; i < len; i++) {
    if (str[i] == 'o') {
      if (i - 1 > 0 && i + 1 < len) ans += (dp1[i - 1] * dp2[i + 1]);
    }
  }
  cout << ans << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
