#include <bits/stdc++.h>
struct rev_tag {
} rev;
struct iter {
  int &i, p;
};
int& operator*(iter& self) { return self.i; }
void operator++(iter& self) { self.i += self.p; }
bool operator!=(iter& lhs, iter& rhs) { return lhs.i != rhs.i; }
struct range {
  int __begin, __end, p;
  iter end() { return {__end, p}; }
  iter begin() { return {__begin, p}; }
  range(int end) : __begin(0), __end(end), p(1) {}
  range(int end, rev_tag) : __begin(--end), __end(-1), p(-1) {}
  range(int begin, int end) : __begin(begin), __end(end), p(1) {}
  range(int begin, int end, rev_tag) : __begin(--end), __end(--begin), p(-1) {}
};
int main() {
  std::ios::sync_with_stdio(false);
  std::string s;
  std::cin >> s;
  std::vector<int> pre(s.size());
  for (int i : range(1, s.size()))
    if (s[i] == 'v' && s[i - 1] == 'v') pre[i] = 1;
  std::partial_sum(pre.begin(), pre.end(), pre.begin());
  std::vector<int> suf(s.size());
  for (int i : range(s.size() - 1, rev))
    if (s[i] == 'v' && s[i + 1] == 'v') suf[i] = 1;
  std::partial_sum(suf.rbegin(), suf.rend(), suf.rbegin());
  int64_t ans = 0;
  for (int i : range(0, s.size() - 1)) {
    if (s[i] == 'v' || i == 0) continue;
    ans += 1ll * pre[i - 1] * suf[i + 1];
  }
  std::cout << ans;
  return 0;
}
