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

#define IOS         ios_base::sync_with_stdio(false);cin.tie(NULL);
#define ll            long long
#define t()           int t;cin>>t;while(t--)
#define lt()          long long int t;cin>>t;while(t--)
#define ff              first
#define ss              second
#define pb              push_back
#define mp              make_pair   
#define pii             pair<int,int>
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define mod             1000000007
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define all(x)              begin(x),end(x)
#define  nik(i,k,n)    for ( long long int i = k; i < (n); ++i)

void YES(){cout<<"YES\n";} void NO(){cout<<"NO\n";}
ll gcd(ll A , ll B)
{
  if(B == 0)return A;
  return gcd(B , A%B);
}
ll fact(ll n){
   ll ans = 1;
   for(ll i=1;i<=n;i++){
      ans*=i%mod;
   }
   return ans%mod;
}

bool checkperfectsquare(int n)
{
    if (ceil((double)sqrt(n)) == floor((double)sqrt(n))) {
        return true;
    }
    return false;
}

bool isPowerOfTwo(ll n)
{
    if (n == 0)
        return 0;
    while (n != 1)
    {
        if (n%2 != 0)
            return 0;
        n = n/2;
    }
    return 1;
}

void fast()
{
   ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
   freopen("inp.txt", "r", stdin);
   freopen("output.txt", "w", stdout);
#endif
}

char s[500005];


void solve()
{
  string s;
  cin >> s;
  int filled = 0 , no = 0 , ques= 0;
  for(auto X : s){
      if(X == 'o')filled++;
      else if( X == 'x')no++;
      else ques++;
  }

  if( filled > 4 ){
      cout << 0 << endl;
      return;
  }
  if( filled == 0){
      cout << ques*ques*ques*ques << endl;
      return;
  }
  if(filled == 4){
      cout << 24 << endl;
      return;
  }
  if(filled == 3){
      cout << ques*24 + 3* 12 << endl;
      return;
  }
  if(filled == 2){
      cout << 12*ques*ques + 4*3*2*ques + (4*2 + 6) << endl;
      return;

  }
  if(filled == 1){
      cout << ques*ques*ques*4 + ques*ques*6 + ques*4 + 1 << endl;
      return;

  }


}  
int32_t main()
{
   IOS;
   //lt(){
      solve();
   //}
   return 0;
}


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

int main() {
  
  string S;
  cin >> S;
  
  int N=10;
  int counter = 0;
  int maru_num = 0;
  int hatena_num = 0;
  
  for (int i = 0; i < N; i++) {
    if( S[i] == 'o' ){
      maru_num++;
    }
    if( S[i] == '?' ){
      hatena_num++;
    }
  }

  
  for (int i = 0; i < maru_num + hatena_num; i++) {
    for (int j = 0; j < maru_num + hatena_num; j++) {
      for (int k = 0; k < maru_num + hatena_num; k++) {
        for (int l = 0; l < maru_num + hatena_num; l++) {
          int check = 1;
          for(int m = 0; m < maru_num; m++){
            if( i == m || j == m || k == m || l == m){
              check *= 1;
            }else{
              check *= 0;
            }
          }
          if(check == 1){
            counter++;
          }
        }
      }
    }
  }
  

  cout << counter << endl;
  
}
  