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.
#include"bits/stdc++.h"
//#include <ext/pb_ds/assoc_container.hpp>

//using namespace __gnu_pbds;
using namespace std;
using namespace chrono;


#define fastio                        ios_base::sync_with_stdio(false); cin.tie(NULL); 
#define int                           long long
#define rep(i,k,n)                    for (int i = k; i < n; i++)
#define per(i,n, k)                   for (int i = n; i >= k; i--)
#define fauto(a,x)                    for (auto& a : x)
#define pb                            push_back 
#define sz                            size()
#define all(var)                      var.begin(), var.end()
#define present(c, x)                 (c.find(x) != c.end())
#define desc                          greater<int>()
#define spc                           <<" "<<
#define YES                           cout << "YES\n";
#define NO                            cout << "NO\n";
#define Yes                           cout << "Yes\n";
#define No                            cout << "No\n";
#define minus1                        cout << "-1\n";
#define ndl                           cout << "\n";
#define endl                          "\n"
#define gcd(a, b)                     __gcd(a, b)
#define PI                            3.1415926535897932384626
#define imin                          LLONG_MIN
#define imax                          LLONG_MAX
#define fi                            first
#define se                            second
#define lb                            lower_bound
#define ub                            upper_bound 
#define set_bits                      __builtin_popcountll
#define setpr(i)                      cout << setprecision(i);
#define mems(t,x)                     memset(t , x , sizeof(t)) ;                        

typedef set<int>                      seti    ;
typedef unordered_set<int>            useti   ;          
typedef map<int, int>                 mapii   ;    
typedef unordered_map<int, int>       umapii  ;               
typedef vector <pair<int , int> >     vpi     ;                 
typedef vector<int>                   vi      ;   
typedef pair<int , int >              pi      ;        
typedef vector<vector<int>>           vvi     ;    
//typedef tree<int,null_type,less<int>,rb_tree_tag,
//tree_order_statistics_node_update> pbds ; 
// order_of_key (val): returns the no. of values less than val
// find_by_order (k): returns the kth largest element.(0-based)

int M=1e9+7;
int power(int a , int n );
int minv(int a){ return power(a , M-2 ); }
int mod(int n) { return (n % M + M) % M; }
int modM(int n, int m) { return ((n % M * m % M) + M) % M; }
int modA(int n, int m) { return ((n % M + m % M) + M) % M; }
int modS(int n, int m) { return ((n % M - m % M) + M) % M; }
int modD(int n, int m) { return ((n % M * minv(m) % M) + M) % M; }
int lcm (int a , int b ) {return (a*b)/gcd(a,b) ;}

//====================================DEBUG FINCTIONS=============================================//

#define ndr cerr<<"\n" ;
#define path(x) cerr<<"Path->"<<x<<"\n";
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#ifndef XINYSTER
#define deb(x) cerr << #x <<" = "; _print(x); cerr << endl;
#else
#define deb(x)
#endif

template <class T> void _print( T x){ cerr<<x; }
template <class T, class V> void _print(pair <T, V> p);
template <class T> void _print(vector <T> v);
template <class T> void _print(set <T> v);
template <class T, class V> void _print(map <T, V> v);
template <class T> void _print(multiset <T> v);
template <class T, class V> void _print(pair <T, V> p) {cerr << "{"; _print(p.fi); cerr << ","; _print(p.se); cerr << "}";}
template <class T> void _print(vector <T> v) {cerr << "[ "; for (T i : v) {_print(i); cerr << " ";} cerr << "]";}
template <class T> void _print(set <T> v) {cerr << "[ "; for (T i : v) {_print(i); cerr << " ";} cerr << "]";}
template <class T> void _print(multiset <T> v) {cerr << "[ "; for (T i : v) {_print(i); cerr << " ";} cerr << "]";}
template <class T, class V> void _print(map <T, V> v) {cerr << "[ "; for (auto i : v) {_print(i); cerr << " ";} cerr << "]";}
template <class T, class V> void _print(unordered_map <T, V> v) {cerr << "[ "; for (auto i : v) {_print(i); cerr << " ";} cerr << "]";}

#define debug(x,n)  cerr <<#x<<" = "  ; _print(x,n); cerr <<endl;
template <class T> void _print( T arr[] ,int n){ cerr<<"[ "; for(int i=0; i<n; i++) { cerr<<arr[i]<<" ";} cerr<<"]";}

//==========================================XINYSTER=============================================//





void solve(){
    
    string s ;
    cin >> s ;

    int n = s.sz ;

    int str = power(10,n-1);

    if(str==1)str--;

    int ans = 0 ;

    for(int i = str ; i<power(10,n) ; i+=25 ){
        
        bool valid =1;
        
        string si = to_string(i);

        char c = 'p';

        for(int j=0; j<si.sz; j++){
            if( (48<=s[j] and s[j] <=58) and s[j]!=si[j] ) { 
                valid=0; break;
            }
            if(s[j]=='X' and c=='p' ){
                c=si[j];
            }
            else if(s[j]=='X' and c!=si[j] ){
                valid=0; break;
            }
        }
        
        if(valid and i%25==0 ){
            ans++;
        }
    }

    cout<<ans<<endl;

    
}



int32_t main(){

    #ifndef XINYSTER
        freopen("Error.txt", "w", stderr);
    #endif
    fastio 
    auto start1 = high_resolution_clock::now();
    

    
    int t = 1;
    // cin >> t;

    //funct calls : 
    


    //
    
    for(int i=1; i<=t; i++){
        //cout<<"Case #"<<i<<": \n";
        solve();
    }

    auto stop1 = high_resolution_clock::now();
    auto duration = duration_cast<microseconds>(stop1 - start1);
    
    #ifndef XINYSTER
    cerr << "Time: " << duration . count()/1000  << endl;
    #endif
}



// FUNCTION DEFINITIONS : 
//===================================================================//

int power(int a , int n ){
    int result = 1;
    while(n){
        if(n & 1) result = (result * a)  % M;
        n >>= 1;
        a = (a * a) % M;
    }
    return result;
}
