#include <bits/stdc++.h>
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
using vl = vector<long long>;
using vi = vector<int>;
using vs = vector<string>;
using vc = vector<char>;
using vvl = vector<vl>;
using P = pair<long long, long long>;
using vvc = vector<vc>;
using vd = vector<double>;
using vp = vector<P>;
using vb = vector<bool>;
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
const long long inf = 2e18;
const long long MOD = 1000000007;
const long long mod = 998244353;
const double pi = acos(-1);
template <typename T1, typename T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &p) {
  os << p.first << " " << p.second;
  return os;
}
template <typename T1, typename T2>
istream &operator>>(istream &is, pair<T1, T2> &p) {
  is >> p.first >> p.second;
  return is;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  for (int i = 0; i < (int)v.size(); i++) {
    os << v[i] << (i + 1 != v.size() ? " " : "");
  }
  return os;
}
template <typename T>
istream &operator>>(istream &is, vector<T> &v) {
  for (T &in : v) {
    is >> in;
  }
  return is;
}
void scan() {}
template <class Head, class... Tail>
void scan(Head &head, Tail &...tail) {
  cin >> head;
  scan(tail...);
}
template <class T>
void print(const T &t) {
  cout << t << '\n';
}
template <class Head, class... Tail>
void print(const Head &head, const Tail &...tail) {
  cout << head << ' ';
  print(tail...);
}
template <class... T>
void fin(const T &...a) {
  print(a...);
  exit(0);
}
template <typename T>
T sum_(vector<T> a) {
  return accumulate(a.begin(), a.end(), T(0));
}
template <typename T1, typename T2>
inline bool chmax(T1 &a, T2 b) {
  return a < b && (a = b, true);
}
template <typename T1, typename T2>
inline bool chmin(T1 &a, T2 b) {
  return a > b && (a = b, true);
}
void solve();
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(15);
  ;
  string s;
  scan(s);
  long long n = s.size();
  long long MIN = powl(10, n - 1);
  if (n == 1)
    MIN = 0;
  else if (n == 2)
    MIN = 25;
  long long MAX = powl(10, n) - 1;
  long long ans = 0;
  for (long long i = MIN; i <= MAX; i += 25) {
    string a = to_string(i);
    long long f = -1;
    bool ok = false;
    for (long long j = 0; j < (long long)(n); j++) {
      if (s[j] == '_') continue;
      if (s[j] == 'X') {
        if (f == -1)
          f = a[j] - '0';
        else if (f != a[j] - '0')
          ok = true;
      } else if (s[j] != a[j])
        ok = true;
    }
    if (!ok) ans++;
  }
  fin(ans);
}

### Prompt

Create a solution in cpp for the following problem:

Mr. Chanek has an integer represented by a string s. Zero or more digits have been erased and are denoted by the character _. There are also zero or more digits marked by the character X, meaning they're the same digit.

Mr. Chanek wants to count the number of possible integer s, where s is divisible by 25. Of course, s must not contain any leading zero. He can replace the character _ with any digit. He can also replace the character X with any digit, but it must be the same for every character X.

As a note, a leading zero is any 0 digit that comes before the first nonzero digit in a number string in positional notation. For example, 0025 has two leading zeroes. An exception is the integer zero, (0 has no leading zero, but 0000 has three leading zeroes).

Input

One line containing the string s (1 ≤ |s| ≤ 8). The string s consists of the characters 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, _, and X.

Output

Output an integer denoting the number of possible integer s.

Examples

Input


25


Output


1


Input


_00


Output


9


Input


_XX


Output


9


Input


0


Output


1


Input


0_25


Output


0

Note

In the first example, the only possible s is 25.

In the second and third example, s ∈ \{100, 200,300,400,500,600,700,800,900\}.

In the fifth example, all possible s will have at least one leading zero.

### Response

```cpp
#include <bits/stdc++.h>
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
using vl = vector<long long>;
using vi = vector<int>;
using vs = vector<string>;
using vc = vector<char>;
using vvl = vector<vl>;
using P = pair<long long, long long>;
using vvc = vector<vc>;
using vd = vector<double>;
using vp = vector<P>;
using vb = vector<bool>;
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
const long long inf = 2e18;
const long long MOD = 1000000007;
const long long mod = 998244353;
const double pi = acos(-1);
template <typename T1, typename T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &p) {
  os << p.first << " " << p.second;
  return os;
}
template <typename T1, typename T2>
istream &operator>>(istream &is, pair<T1, T2> &p) {
  is >> p.first >> p.second;
  return is;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  for (int i = 0; i < (int)v.size(); i++) {
    os << v[i] << (i + 1 != v.size() ? " " : "");
  }
  return os;
}
template <typename T>
istream &operator>>(istream &is, vector<T> &v) {
  for (T &in : v) {
    is >> in;
  }
  return is;
}
void scan() {}
template <class Head, class... Tail>
void scan(Head &head, Tail &...tail) {
  cin >> head;
  scan(tail...);
}
template <class T>
void print(const T &t) {
  cout << t << '\n';
}
template <class Head, class... Tail>
void print(const Head &head, const Tail &...tail) {
  cout << head << ' ';
  print(tail...);
}
template <class... T>
void fin(const T &...a) {
  print(a...);
  exit(0);
}
template <typename T>
T sum_(vector<T> a) {
  return accumulate(a.begin(), a.end(), T(0));
}
template <typename T1, typename T2>
inline bool chmax(T1 &a, T2 b) {
  return a < b && (a = b, true);
}
template <typename T1, typename T2>
inline bool chmin(T1 &a, T2 b) {
  return a > b && (a = b, true);
}
void solve();
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(15);
  ;
  string s;
  scan(s);
  long long n = s.size();
  long long MIN = powl(10, n - 1);
  if (n == 1)
    MIN = 0;
  else if (n == 2)
    MIN = 25;
  long long MAX = powl(10, n) - 1;
  long long ans = 0;
  for (long long i = MIN; i <= MAX; i += 25) {
    string a = to_string(i);
    long long f = -1;
    bool ok = false;
    for (long long j = 0; j < (long long)(n); j++) {
      if (s[j] == '_') continue;
      if (s[j] == 'X') {
        if (f == -1)
          f = a[j] - '0';
        else if (f != a[j] - '0')
          ok = true;
      } else if (s[j] != a[j])
        ok = true;
    }
    if (!ok) ans++;
  }
  fin(ans);
}

```