#include <bits/stdc++.h>
using namespace std;
int n, ans1[1000010], ans2[1000010];
long long ans = 0;
string a;
int main() {
  cin >> a;
  n = a.size();
  for (int i = 1; i < n; ++i) {
    ans1[i] = ans1[i - 1];
    if (a[i] == 'v' && a[i - 1] == 'v') ans1[i]++;
  }
  for (int i = n - 1; i >= 0; --i) {
    ans2[i] = ans2[i + 1];
    if (a[i] == 'v' && a[i + 1] == 'v') ans2[i]++;
  }
  for (int i = 0; i < n; ++i)
    if (a[i] == 'o') ans += (long long)ans1[i] * ans2[i];
  cout << ans << endl;
  return 0;
}
