// Keep it simple
#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define Br cout<<endl
#define int long long
#define fe first
#define se second
#define double long double
#define all(v) v.begin(),v.end()
#define allr(v) v.rbegin(),v.rend()
#define PT(x) cout << (x) << endl
#define last(x)  prev(x.end())
#define PP(x) cout << (x) << " "
#define PS(x) for(auto it: x)cout << it <<" "; cout << endl;
#define PTT(x) cout << (#x) << " is " << (x) << endl
#define lets_go ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef vector<ii> vii;
void PV(vi v) { for (int i = 0 ; i < (int)v.size() ; i++) cout << v[i] << " " ; cout << endl;}
void PVV(vii v) {for (int i = 0 ; i < (int)v.size() ; i++) cout << v[i].first << " " << v[i].second << endl;}
void PA(int v[], int n, int x = 0) { for (int i = x ; i < n + x; i++)cout << v[i] << ' ' ; cout << endl;}
void IN(int a[], int n, int x = 0) {for (int i = x; i < n + x; i++)cin >> a[i];}
inline void op() {
#ifndef ONLINE_JUDGE
   freopen("input.txt", "r", stdin);
   freopen("output.txt", "w", stdout);
#endif
}

// <=================================================================================================================================
// <=================================================================================================================================
const int M = 1e9 + 7;
const int IM = 1e18 + 37;
const int N = 2e5 + 10;


signed  main() {
   lets_go
   op();


   int n;
   cin >> n;
   set<int> s = {10, 6, 15};

   for (int i = 10; i <= 10000; i += 10) {
      if (s.size() == n)
         break ;
      s.insert(i);
   }
   for (int i = 6; i <= 10000; i += 6) {
      if (s.size() == n)
         break ;
      s.insert(i);
   }
   for (int i = 15; i <= 10000; i += 15) {
      if (s.size() == n)
         break ;
      s.insert(i);
   }
   PS(s);




   return 0;
}

#include <bits/stdc++.h>

using namespace std;

void solve() {
    string s;
    cin >> s;
    int ans = 0;
    for (int i = 0; i <= 9999; ++i) {
        set<char> have;
        int t = i;
        for (int j = 0; j < 4; ++j) {
            have.insert(t % 10);
            t /= 10;
        }
        int res = 1;
        for (int j = 0; j < s.size(); ++j) {
            if ((s[j] == 'o' && !have.count(j)) || (s[j] == 'x' && have.count(j))) {
                res = 0;
                break;
            }
        }
        ans += res;
    }
    cout << ans << "\n";
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    solve();
    return 0;
}