#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string S;
  cin >> S;
  long long cnt1 = 0, cnt2 = 0, cnt3 = 0;
  for (int i = 0; i <= ((int)S.size()) - 1; ++i) {
    if (i > 0 && S[i - 1] == 'v' && S[i] == 'v') {
      cnt3 += cnt2;
      cnt1 += 1;
    } else if (S[i] == 'o') {
      cnt2 += cnt1;
    }
  }
  cout << cnt3 << endl;
  return 0;
}
