Apart from Nian, there is a daemon named Sui, which terrifies children and causes them to become sick. Parents give their children money wrapped in red packets and put them under the pillow, so that when Sui tries to approach them, it will be driven away by the fairies inside.

Big Banban is hesitating over the amount of money to give out. He considers loops to be lucky since it symbolizes unity and harmony.

He would like to find a positive integer n not greater than 1018, such that there are exactly k loops in the decimal representation of n, or determine that such n does not exist.

A loop is a planar area enclosed by lines in the digits' decimal representation written in Arabic numerals. For example, there is one loop in digit 4, two loops in 8 and no loops in 5. Refer to the figure below for all exact forms.

<image>

Input

The first and only line contains an integer k (1 ≤ k ≤ 106) — the desired number of loops.

Output

Output an integer — if no such n exists, output -1; otherwise output any such n. In the latter case, your output should be a positive decimal integer not exceeding 1018.

Examples

Input

2


Output

462

Input

6


Output

8080
//package graphs;
import java.util.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class PW {
	
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		FastReader s = new FastReader();
	    
		int n=s.nextInt();
		
		
		if(n>36)
			System.out.println("-1");
		else
		{
			while(n>0)
			{
				if(n%2==0){
					System.out.print(8);
					n-=2;
					}
				else{
					System.out.print(4);
					n--;
				}
			}
		}
		
		
	
	}
//	1  4   8
	 
	public static String solve(int digits[])
	{
		 Arrays.sort(digits);
	        List<String> temp=new ArrayList<>();
	        
	        int min1=Integer.MAX_VALUE,min11=Integer.MAX_VALUE,min2=Integer.MAX_VALUE,min3=Integer.MAX_VALUE,sum=0;
	        
	        
	        for(int i:digits)
	        {
	            if(i%3==1)
	            {
	               if(i<=min1)
	                {
	                    min11=min1;
	                    min1=i;
	                }
	                else if(i<=min11)
	                {
	                    min11=i;
	                }
	            }
	            if(i%3==2)
	            {
	                if(i<=min2)
	                {
	                    min3=min2;
	                    min2=i;
	                }
	                else if(i<=min3)
	                {
	                    min3=i;
	                }
	            }
	            
	        }
	        
	        //System.out.println(min1+" "+min11+" "+min2+" "+min3);
	        
	        for(int i:digits)
	            sum+=i;
	        
	        if(sum%3==0)
	        {
	            for(int i:digits)
	                temp.add(String.valueOf(i));
	        }
	        else if(sum%3==1&&min1!=Integer.MAX_VALUE)
	        {
	            
	                int flag=0;
	                for(int i:digits)
	                {
	                    if(i==min1&&flag==0)
	                    {
	                        flag=1;
	                        continue;
	                    }else
	                    {
	                        temp.add(String.valueOf(i));
	                    }
	                }
	            
	        }
	        else if(sum%3==1 && min2!=Integer.MAX_VALUE && min3!=Integer.MAX_VALUE)
	        {
	            int flag1=0,flag2=0;
	            
	            for(int i:digits)
	            {
	                if(i==min2&&flag1==0)
	                {
	                    flag1=1;
	                    continue;
	                }
	                else if(i==min3&&flag2==0)
	                {
	                    flag2=1;
	                    continue;
	                }
	                else
	                    temp.add(String.valueOf(i));
	            }
	            
	        }
	        else if(sum%3==2 && min2!=Integer.MAX_VALUE)
	        {
	           
	                int flag=0;
	                for(int i:digits)
	                {
	                    if(i==min2&&flag==0)
	                    {
	                        flag=1;
	                        continue;
	                    }else
	                    {
	                        temp.add(String.valueOf(i));
	                    }
	                }
	            
	        }
	        else if(sum%3==2 && min1!=Integer.MAX_VALUE && min11!=Integer.MAX_VALUE)
	        {
	            
	             int flag1=0,flag2=0;
	            
	            for(int i:digits)
	            {
	                if(i==min1&&flag1==0)
	                {
	                    flag1=1;
	                    continue;
	                }
	                else if(i==min11&&flag2==0)
	                {
	                    flag2=1;
	                    continue;
	                }
	                else
	                    temp.add(String.valueOf(i));
	            }
	            
	        }
	        
	        return largestNumber(temp);
	       
	        
	    }
	    
	    public static String largestNumber( List<String> ab) {
	        
	       // List<String> ab= new ArrayList<>();
	       // for(int i=0;i<A.size();i++)
	       // {
	       //     ab.add(String.valueOf(A.get(i)));
	       // }
	        
	        Collections.sort(ab, new Comparator<String>(){ 
	            
	            public int compare(String X, String Y) { 
	          
	        // first append Y at the end of X 
	        String XY=X + Y; 
	          
	        // then append X at the end of Y 
	        String YX=Y + X; 
	          
	        // Now see which of the two formed numbers  
	        // is greater 
	        return XY.compareTo(YX)>0?-1:1; 
	            
	                
	            }
	            
	            
	            
	        });
	        StringBuilder abc= new StringBuilder();
	        
	        
	        for(int i=0;i<ab.size();i++)
	        {
	           abc.append(ab.get(i));
	            
	        }
	        if(abc.length()==0)
	            return abc.toString();
	        
	        if(abc.charAt(0)=='0')
	        return "0";
	        else
	        return abc.toString();
	        
	    }
	
	public static boolean pal(String s)
	{
		int i=0;
		int j=s.length()-1;
		while(i<=j)
		{
			if(s.charAt(i)!=s.charAt(j))
				return false;
			i++;
			j--;
		}
		return true;
	}
	
	
	
	
	static class FastReader {
        BufferedReader br;
        StringTokenizer st;
 
        public FastReader()
        {
            br = new BufferedReader(
                new InputStreamReader(System.in));
        }
 
        String next()
        {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
 
        int nextInt() { return Integer.parseInt(next()); }
 
        long nextLong() { return Long.parseLong(next()); }
 
        double nextDouble()
        {
            return Double.parseDouble(next());
        }
 
        String nextLine()
        {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

	
	public static long solve(int n, int r)
    {


        long p = 1, k = 1;
        if (n - r < r) {
            r = n - r;
        }
 
        if (r != 0) {
            while (r > 0) {
                p *= n;
                k *= r;
 
                long m = __gcd(p, k);
 
                
                p /= m;
                k /= m;
 
                n--;
                r--;
            }
 
           
        }
        else {
            p = 1;
        }
 
        
        //System.out.println(p);
        return p;
    }
	
	
	public static long gcd(long a,long b)
	{
		if(a==0||b==0)
			return a+b;
		return gcd(b,(a%b));
	}
	
	public static long __gcd(long n1, long n2)
    {
        long gcd = 1;
 
        for (int i = 1; i <= n1 && i <= n2; ++i) {
            // Checks if i is factor of both integers
            if (n1 % i == 0 && n2 % i == 0) {
                gcd = i;
            }
        }
        return gcd;
    }
	
	public static boolean prime(int n)
	{
		if(n<=2)
			return true;
		
		for(int i=2;i<=Math.sqrt(n);i++)
		{
			if(n%i==0)
				return false;
		}
		
		return true;
		
	}
	public static long fastExpo(long a,long n,long mod){
        if (n == 0)
            return 1;
        else{
            long x = fastExpo(a,n/2,mod);
            if ((n&1) == 1){
                return (((a*x)%mod)*x)%mod;
            }
            else{
                return (((x%mod)*(x%mod))%mod)%mod;
            }
        }
    }
}
class pair{
	//public:
		long f;
		long s;
		pair(long x,long y)
		{
			f=x;
			s=y;
		}
        
}


