#include <algorithm>
#include <cstdio>
#include <functional>
#include <iostream>
#include <cfloat>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <time.h>
#include <complex>
#include <vector>
#include <limits>
#include <iomanip>
#include <cassert>
#include <numeric>
#include <chrono>
#include <random>

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

#define debug(x) cerr << #x << " = " << (x) << endl;
#define debug_pii(x) cerr << "(" << x.first << "," << x.second << ")";
#define rep(i, n) for(int i = 0;i < n;i++)
#define pb push_back
#define F first
#define S second

// template<typename _Ty1, typename _Ty2>
// ostream& operator<<(ostream& _os, const pair<_Ty1, _Ty2>& _p) {
//     _os << '(' <<_p.first << ',' << _p.second << ')';
//     return _os;
// }
//
// template<typename _Ty1, typename _Ty2>
// istream& operator>>(istream& _is, pair<_Ty1, _Ty2>& _p) {
//     _is >> _p.first >> _p.second;
//     return _is;
// }

int query(int s, int e) {
  cout << "? " << s << " " << e << endl;
  int in;cin >> in;
  return in;
}

void solve() {
  // sure, maybe
  // sure > 4 -> 0
  // maybeC(4-sure)*24

  set<int> sure, notsure;
  string s;cin>>s;
  for(int i = 0;i < 10;i++) {
    char ch = s[i];
    if(ch == 'o') sure.insert(i);
    if(ch == 'x') notsure.insert(i);
  }

  int ans = 0;
  rep(i,10){
    rep(j,10){
      rep(k,10){
        rep(l,10){
          // i j k l
          bool possible = true;
          set<int> z{i,j,k,l};
          for(int x : z) if(notsure.count(x) == 1) possible = false;
          for(int x : sure) if(z.count(x) == 0) possible = false;
          ans += possible;
        }
      }
    }
  }
  cout<<ans<<endl;
}

// 5
// (300+3t) + x


int main() {

 // freopen("input.in","r",stdin);
 // freopen("output.out","w",stdout);
 // cout << fixed << setprecision(15);

 ios_base::sync_with_stdio(false);
 cin.tie(nullptr);

 int t = 1;
 // cin >> t;
 while (t--) {
   solve();
 }

 return 0;
}

#include <bits/stdc++.h>
#define ll long long
#define int long long
#define arr(a) new int[a]
#define db1(x) cout<<#x<<"="<<x<<'\n'
#define db2(x,y) cout<<#x<<"="<<x<<","<<#y<<"="<<y<<'\n'
#define db3(x,y,z) cout<<#x<<"="<<x<<","<<#y<<"="<<y<<","<<#z<<"="<<z<<'\n'
#define dbV(arr) cout << #arr << "=[ "; \
for(auto i:arr) cout << i << " "; cout << "]\n";
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define repF(i,a,n) for(int i = (a); i <= (n); ++i)
#define repB(i,a,n) for(int i = (a); i >= (n); --i)
#define test(t) int t;cin>>t;while(t--)
#define inp(a) int a;cin>>a;
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vi vector<int>
#define vl vector<ll>
#define umii unordered_map<int,int>
#define umll unordered_map<ll,ll>
#define mii map<int,int>
#define mll map<ll,ll>
#define seti set<int>
#define setl set<ll>
#define pb push_back
#define F first
#define S second
#define MOD 1000000007
#define all(z) z.begin(),z.end()
using namespace std;
void printArray(int a[],int n)
{
	rep(i,n)
	cout<<a[i]<<" ";
	cout<<"\n";
}

void printVec(vi v)
{
	int s = v.size();
	rep(i,s)
	cout<<v[i]<<" ";
	cout<<"\n";
}
void printBool(bool b)
{
 	if(b) cout<<"YES\n";
 	else cout<<"NO\n";
}
bool check(int a,string s)
{
	int p = a/1000,q = a/100 - 10*p,r = a/10 - 100*p - 10*q,t = a - 1000*p - 100*q - 10*r;
	bool b = 1;
	for(int i = 0;i<10;i++)
	{
		if(s[i] == 'o')
		{
			if(p != i && q != i && r != i && t != i)
			{
				b = 0;
				break;
			}
		}
		else if(s[i] == 'x')
		{
			if(p == i || q == i || r == i || t == i)
			{
				b = 0;
				break;
			}
		}
	}
	return b;
}
signed main()
{
 	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
	cout.tie(NULL);
	string s;
	cin>>s;
	int ans = 0;
	for(int i = 0;i<10000;i++)
	{
		if(check(i,s))
		ans++;
	}
	cout<<ans;
 return 0;
}
