#include <bits/stdc++.h>
using namespace std;
#define int long long

int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);

    string s;
    cin >> s;
    int x = 0, o = 0, q = 0;
    for (auto &i : s)
    {
        if (i == 'x')
            x++;
        else if (i == 'o')
            o++;
        else
            q++;
    }
    if (o > 4 or o + q == 0)
        cout << 0 << endl;
    else
    {
        q += o;
        int ans = q * q * q * q;

        auto c = [](int n, int r)
        {
            if (r == 1)
                return n;
            if (r == 2)
                return n * (n - 1) / 2;
            if (r == 3)
                return n * (n - 1) * (n - 2) / 6;
            return n * (n - 1) * (n - 2) * (n - 3) / 24;
        };

        for (int i = 1; i <= o; i++)
        {
            ans -= (i & 1 ? 1 : -1) * pow(q - i, 4) * c(o, i);
        }
        cout << ans << endl;
    }
}
#include <bits/stdc++.h>
using namespace std;

int main() {
  string s;
  cin >> s;

  int res = 0;
  for (int i = 0; i < 10000; i++) {
    int n = i;
    vector<int> d(4);
    for (int j = 0; j < 4; j++) {
      d.at(j) = n%10;
      n /= 10;
    }

    bool check = true;
    for (int j = 0; j < 4; j++) {
      if (s.at(d.at(j)) == 'x') {
        check = false;
        break;
      }
    }
    if (!check) {
      continue;
    }

    for (int k = 0; k < 10; k++) {
      if (s.at(k) == 'o') {
        if (d.at(0) != k && d.at(1) != k && d.at(2) != k && d.at(3) != k) {
          check = false;
          break;
        }
      }
    }

    if (check) {
      res++;
    }
  }

  cout << res << endl;
}