#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define PI 3.14159265359
using ll = long long;
#define MAX 100000

int main(){
    string s;
    cin >> s;
    int ans = 0;
    rep(num, 10000){
        vector<int> a(10);
        int x = num;
        rep(i,4){
            int d = x%10;
            a[d] = 1;
            x /= 10;
        }
        bool ok = true;
        rep(i,10){
            if(s[i] == 'o' && a[i] != 1) ok = false;
            if(s[i] == 'x' && a[i] != 0) ok = false;
        }
        if(ok) ans++;
    }
    cout << ans << endl;
    return 0;
}

#pragma GCC optimize("Ofast")
// #pragma GCC target("avx,avx2,fma")

#include <bits/stdc++.h>

#define F first
#define S second
#define vec vector
#define pb push_back
#define cld complex<ld>
#define pll pair<ll, ll>
#define pdd pair<ld, ld>
#define umap unordered_map
#define uset unordered_set
#define pii pair<int, int>
#define pnn pair<Node*, Node*>
#define all(m) m.begin(), m.end()
#define uid uniform_int_distribution
#define init(m, x) memset(m, x, sizeof(m));
#define pripii(p) cout << "{" << p.F << ", " << p.S << "} "
#define fast cin.tie(0); cout.tie(0); cin.sync_with_stdio(0); cout.sync_with_stdio(0);
using namespace std;
typedef string str;
typedef long long ll;
typedef long double ld;
typedef unsigned int uint;
typedef unsigned long long ull;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());

int main() {
    fast;
    str t; cin >> t;
    int o = 0;
    set<int> mu, nmu;
    for (int q = 0; q < 10; q++) {
        if (t[q] == 'o') mu.insert(q);
        if (t[q] == 'x') nmu.insert(q);
    }
    for (int q = 0; q < 10; q++) {
        for (int w = 0; w < 10; w++) {
            for (int e = 0; e < 10; e++) {
                for (int r = 0; r < 10; r++) {
                    set<int> tyt = {q, w, e, r};
                    int fl = 1;
                    for (int i : mu) fl &= tyt.count(i);
                    for (int i : nmu) fl &= !tyt.count(i);
                    o += fl;
                }
            }
        }
    }
    cout << o;
}
