#include <bits/stdc++.h>
using namespace std;
 
using ll = long long int;
using ull = unsigned long long int;
using P = pair<int, int>;
using P3 = pair<int,P>;
using PP = pair<P, P>;
constexpr int INF32 = 1 << 29;
constexpr ll INF64 = 1LL << 61;
constexpr ll MOD = 1000000007;
// constexpr ll MOD = 998244353;
constexpr int di[] = {0, 1, 0, -1};
constexpr int dj[] = {1, 0, -1, 0};
constexpr int di8[] = {0, 1, 1, 1, 0, -1, -1, -1};
constexpr int dj8[] = {1, 1, 0, -1, -1, -1, 0, 1};
constexpr double EPS = 1e-10;
const double PI = acos(-1);
 
#define ALL(v) (v).begin(),(v).end()
#define REP(i,n) for(int i=0,i_len=n; i<i_len; ++i)
 
template<typename T1,typename T2> bool chmax(T1 &a, T2 b) { if (a<b) { a=b; return 1; } return 0; }
template<typename T1,typename T2> bool chmin(T1 &a, T2 b) { if (b<a) { a=b; return 1; } return 0; }

int main(){
    string s;
    cin >> s;
    int ans = 0;
    for(int i=0;i<10000;i++){
        string t = to_string(i);
        while(t.size() < 4) t.insert(t.begin(),'0');
        bool valid = true;
        for(int j=0;j<10;j++){
            if(s[j]=='o'){
                valid &= t.find('0'+j) != t.npos;
            }
            if(s[j]=='x'){
                valid &= t.find('0'+j) == t.npos;
            }
        }
        if(valid) ans++;
    }
    cout << ans << endl;
    return 0;
}
#include<bits/stdc++.h>

using namespace std;
typedef long long int ll;


ll cnt[3];


// ll solve(ll a, ll b, ll c){
//     if (a>4) return 0;
//     if (a==4) return 24;
//     if (a==3){
//         if (c==0) return 81-solve(1,b,1)-solve(1,b,2);
//         else return solve(a,b,0)+24*c;
//     }
//     if (a==2){
//         if (c==0) return 16-2;
//         if (c==1) return solve(3,7,0)+solve(a,b,0);
//         if (c==2) return solve(4,6,0)+solve(a,b,1);
//         if (c==3) return 3*solve(4,6,0)
//     }

// }

ll combi(ll a, ll b){
    if (a==b) return 1;
    if (2 * b > a) return combi(a, a-b);
    ll ret = 1;
    for(ll i=0; i<b; i++){
        ret *= (a-i);
    }
    for(ll i=1; i<=b; i++){
        ret /= i;
    }
    return ret;
}



// 4桁の数字をa個の文字を使って作る方法
ll make_four_digits(ll a){
    if (a==4) return 24;
    if (a==3) return 81-combi(3,2)*make_four_digits(2)-combi(3,1)*make_four_digits(1);
    if (a==2) return 16-combi(2,1)*make_four_digits(1);
    if (a==1) return 1;
    else return 0;
}


ll solve(ll a, ll b, ll c){
    if (a>4) return 0;
    if (a==4) return make_four_digits(4);
    if (a==3){
        if (c==0) return make_four_digits(3);
        if (c==1) return make_four_digits(3) + make_four_digits(4);
        else return make_four_digits(3) + c*make_four_digits(4);
    }else if (a==2){
        if (c==0) return make_four_digits(2);
        if (c==1) return make_four_digits(2) + make_four_digits(3);
        else return make_four_digits(2) + combi(c,1)*make_four_digits(3) + combi(c,2)*make_four_digits(4);
    }else if (a==1){
        if (c==0) return 1;
        if (c==1) return make_four_digits(1)+make_four_digits(2);
        if (c==2) return make_four_digits(1) + combi(2,1)*make_four_digits(2) + combi(2,2)*make_four_digits(3);
        else return make_four_digits(1) + combi(c,1)*make_four_digits(2) + combi(c,2)*make_four_digits(3) + combi(c,3)*make_four_digits(4);
    }else{ // (a==0)
        if (c==0) return 0;
        if (c==1) return 1;
        if (c==2) return combi(2,1)*make_four_digits(1) + combi(2,2)*make_four_digits(2);
        if (c==3) return combi(3,1)*make_four_digits(1) + combi(3,2)*make_four_digits(2) + combi(3,3)*make_four_digits(3);
        else return combi(c,1)*make_four_digits(1) + combi(c,2)*make_four_digits(2) + combi(c,3)*make_four_digits(3) + combi(c,4)*make_four_digits(4);
    }
}


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

    for(ll i=0; i<S.size(); i++){
        if (S[i]=='o') cnt[0]++;
        else if (S[i]=='x') cnt[1]++;
        else cnt[2]++;
    }

    cout << solve(cnt[0], cnt[1], cnt[2]) << endl;
    return 0;
}