#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s, ss = "";
  cin >> s;
  bool bb = 0, tt = 0, bc = 0, bd = 0, uu = 0, bkk = 0, bbc = 0;
  long long n = s.size(), i;
  long long ans = 0;
  if (s.size() == 1) {
    if (s[0] == '0' || (s[0] == 'X' || s[0] == '_')) ans = 1;
  } else if (s.size() == 2) {
    if (s == "25")
      ans = 1;
    else if (s == "75")
      ans = 1;
    else if (s == "50")
      ans = 1;
    else if (s == "__")
      ans = 3;
    else if (s == "_X")
      ans = 3;
    else if (s == "X_")
      ans = 3;
    else if (s[0] == '2' || (s[0] == '7' || s[0] == '5')) {
      if (s[1] == '_' || s[1] == 'X') ans = 1;
    } else if (s[1] == '5') {
      ans = 2;
    } else if (s[1] == '0') {
      ans = 1;
    }
  } else {
    ss += s[n - 2];
    ss += s[n - 1];
    if (ss == "25")
      ans = 1;
    else if (ss == "75")
      ans = 1;
    else if (ss == "50")
      ans = 1;
    else if (ss == "00")
      ans = 1;
    else if (ss == "__")
      ans = 4;
    else if (ss == "_X") {
      ans = 4;
      bb = 1;
    } else if (ss == "X_") {
      ans = 4;
      bd = 1;
    } else if (ss == "XX") {
      ans = 1;
      bc = 1;
    } else if (s[n - 2] == '2' ||
               (s[n - 2] == '7' || (s[n - 2] == '5' || s[n - 2] == '0'))) {
      if (s[n - 1] == 'X') {
        ans = 1;
        bkk = 1;
        if (s[0] == 'X' && (s[n - 2] == '0' || s[n - 2] == '5')) {
          cout << "0";
          return 0;
        }
      } else if (s[n - 1] == '_') {
        ans = 1;
      }
    } else if (s[n - 2] == '_') {
      if (s[n - 1] == '5')
        ans = 2;
      else if (s[n - 1] == '0')
        ans = 2;
    } else if (s[n - 2] == 'X') {
      if (s[n - 1] == '5') {
        ans = 2;
        bbc = 1;
      } else if (s[n - 1] == '0') {
        if (s[0] == 'X')
          ans = 1;
        else
          ans = 2;
      }
    }
    if (s[0] == '0')
      ans = 0;
    else if (s[0] == '_')
      ans *= 9;
    else if (s[0] == 'X') {
      uu = 1;
      if (bb)
        ans = 2;
      else if (bc)
        ans = 0;
      else if (bd) {
        ans = 3;
      } else if (!bbc && (!bkk)) {
        ans *= 9;
      }
    }
    for (i = 1; i < n - 2; i++) {
      if (s[i] == '_')
        ans *= 10;
      else if (s[i] == 'X')
        tt = 1;
    }
    if (tt && (!bc && (!bd && ((!bb && !uu) && ((!bbc && !bkk)))))) ans *= 10;
  }
  cout << ans;
  cerr << "time taken : " << (float)clock() / CLOCKS_PER_SEC << " secs" << endl;
  return 0;
}

### Prompt

Your task is to create a cpp solution to 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>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s, ss = "";
  cin >> s;
  bool bb = 0, tt = 0, bc = 0, bd = 0, uu = 0, bkk = 0, bbc = 0;
  long long n = s.size(), i;
  long long ans = 0;
  if (s.size() == 1) {
    if (s[0] == '0' || (s[0] == 'X' || s[0] == '_')) ans = 1;
  } else if (s.size() == 2) {
    if (s == "25")
      ans = 1;
    else if (s == "75")
      ans = 1;
    else if (s == "50")
      ans = 1;
    else if (s == "__")
      ans = 3;
    else if (s == "_X")
      ans = 3;
    else if (s == "X_")
      ans = 3;
    else if (s[0] == '2' || (s[0] == '7' || s[0] == '5')) {
      if (s[1] == '_' || s[1] == 'X') ans = 1;
    } else if (s[1] == '5') {
      ans = 2;
    } else if (s[1] == '0') {
      ans = 1;
    }
  } else {
    ss += s[n - 2];
    ss += s[n - 1];
    if (ss == "25")
      ans = 1;
    else if (ss == "75")
      ans = 1;
    else if (ss == "50")
      ans = 1;
    else if (ss == "00")
      ans = 1;
    else if (ss == "__")
      ans = 4;
    else if (ss == "_X") {
      ans = 4;
      bb = 1;
    } else if (ss == "X_") {
      ans = 4;
      bd = 1;
    } else if (ss == "XX") {
      ans = 1;
      bc = 1;
    } else if (s[n - 2] == '2' ||
               (s[n - 2] == '7' || (s[n - 2] == '5' || s[n - 2] == '0'))) {
      if (s[n - 1] == 'X') {
        ans = 1;
        bkk = 1;
        if (s[0] == 'X' && (s[n - 2] == '0' || s[n - 2] == '5')) {
          cout << "0";
          return 0;
        }
      } else if (s[n - 1] == '_') {
        ans = 1;
      }
    } else if (s[n - 2] == '_') {
      if (s[n - 1] == '5')
        ans = 2;
      else if (s[n - 1] == '0')
        ans = 2;
    } else if (s[n - 2] == 'X') {
      if (s[n - 1] == '5') {
        ans = 2;
        bbc = 1;
      } else if (s[n - 1] == '0') {
        if (s[0] == 'X')
          ans = 1;
        else
          ans = 2;
      }
    }
    if (s[0] == '0')
      ans = 0;
    else if (s[0] == '_')
      ans *= 9;
    else if (s[0] == 'X') {
      uu = 1;
      if (bb)
        ans = 2;
      else if (bc)
        ans = 0;
      else if (bd) {
        ans = 3;
      } else if (!bbc && (!bkk)) {
        ans *= 9;
      }
    }
    for (i = 1; i < n - 2; i++) {
      if (s[i] == '_')
        ans *= 10;
      else if (s[i] == 'X')
        tt = 1;
    }
    if (tt && (!bc && (!bd && ((!bb && !uu) && ((!bbc && !bkk)))))) ans *= 10;
  }
  cout << ans;
  cerr << "time taken : " << (float)clock() / CLOCKS_PER_SEC << " secs" << endl;
  return 0;
}

```