#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  string sub = "wow";
  vector<vector<long long> > dp(s.length() + 1, vector<long long>(4, 0));
  for (int j = 0; j <= s.length(); j++) dp[j][0] = 1;
  for (int i = 2; i <= s.length(); i++) {
    for (int j = 1; j <= 3; j++) {
      if (sub[j - 1] == 'w' && s[i - 1] == 'v' && s[i - 2] == 'v') {
        dp[i][j] = dp[i - 2][j - 1] + dp[i - 1][j];
      } else if (sub[j - 1] == 'o' && s[i - 1] == 'o') {
        dp[i][j] = dp[i - 1][j - 1] + dp[i - 1][j];
      } else {
        dp[i][j] = dp[i - 1][j];
      }
    }
  }
  cout << dp[s.length()][3] << endl;
  return 0;
}
