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


import java.awt.CardLayout;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.util.TreeMap;

public class Main {

	static class inStatic {}
	class inNotStatic {}
	static char cc;
	static boolean isValid(String S) {
		
		int count1 = 0;
		int count0 = 0;
		int count10 = 0;
		int count01 = 0;
		
		for (int i = 0; i < S.length(); i++) {
			if(S.charAt(i)=='1' ) count1++;
			else if(S.charAt(i)=='0') count0++;
		}
		
		for (int i = 0; i < S.length() -1; i++) {
			if(S.charAt(i)=='1' && S.charAt(i+1)=='0') count10++;
			if(S.charAt(i)=='0' && S.charAt(i+1)=='1') count01++;
		}
		
		if(count10 > 1 || count01 > 0) return false;
	
		return (count1 - count0) == 1;
	}
	
	private static int totalSuccessful = 0;
	private static int totalUnSuccessful = 0;
	
	
	public static void main(String[] args) throws Exception
	{
		Scanner scanner = new Scanner(System.in);
		
	
	
	
		
		StringBuilder sb = new StringBuilder();	

		int n = scanner.nextInt();
			if(n%2==0) {
				n/=2;
			for (int i = 0; i < n; i++) {
				sb.append(8);
			}
			
		}
			else {
				for (int i = 0; i < (n -1)/2; i++) {
					sb.append(8);
				}
				sb.append(6);
				//System.out.println(sb);
			}

			try {
				Long l = Long.parseLong(sb.toString());
			
				if (l<(long)(Math.pow(10, 18))) {
					System.out.println(l);
				}
				else  {
					System.out.println(-1);
				}
			}
			catch(NumberFormatException e) {
				System.out.println(-1);
			}

		
} 	
	static ArrayList<Integer> sum(int [] a, int p) {
		
		ArrayList<Integer> list = new ArrayList<>();
		
		for (int i = a.length -1; i >=0; i--) {
			list.add(a[i]);
		}
		return list;
	}

	
	static void notChnage(int [] a, int carIndex) {
		for (int i = 0; i < a.length; i++) {
			if(i==carIndex) totalSuccessful++;
			else totalUnSuccessful++;
		}
	}

	static int openTheDoor(int [] a ,int car, int user) {
		
		if(car!=user) return 3 - car - user;
		
		return -1;
	}

	static int calculateMinTime(int [] a) {
	
	HashSet<Integer> set = new HashSet<>();
	int count = 0;
	while(set.size()!=a.length) {
		for (int i = 0; i < a.length; i++) {
			if(a[i]==1) {
				if(i-1>=0) {
					a[i-1]=1;
					set.add(i-1);
				}
				if(i+1<a.length) {
					a[i+1]=1;
					set.add(i+1);
					i+=2;
				}
			}
		}
		System.out.println(Arrays.toString(a));
		count++;
	}
	
	return count;
}
	static int [] copyAnArray(int [] a) {
		int [] b= new int[a.length];
		
		for (int i = 0; i < b.length; i++) {
			b[i]=a[i];
		}
		
		return b;
	}
	
	static int makeANumber(int [] a) {
		
		StringBuilder sb = new StringBuilder();
		
		for (int i = 0; i < a.length; i++) {
			sb.append(a[i]);
		}
		
		return Integer.parseInt(sb.toString());
	}
		
	static int maxValueInKnapsack(int [] values, int [] weights, int weight) {
		
		TreeMap<Integer, Integer> map = new TreeMap<>();
		
		for (int i = 0; i < values.length; i++) {
			map.put(values[i], weights[i]);
		}
		
		int maxWeight = 0;

		
		for (Map.Entry<Integer, Integer> i : map.entrySet()) {

			if(maxWeight+i.getValue()>weight) continue;
			System.out.println(i.getKey());
			 maxWeight += i.getKey();
			
		}		
		
		return maxWeight;
	}
	
	static boolean isDivisible(int [] a) {
		
		int sum = 0;
		
		for (int i = 0; i < a.length; i++) {
			sum+=sumOfDigits(a[i]);
		}
		
		return sum%3==0;
	} 
	static int sumOfDigits(int n) {
		int sum = 0;
		
		while(n>0) {
			sum+=n%10;
			n/=10;
		}
		return sum;
	}
	static boolean isKaprekarNumber(long n) {
		
		if(n == 1) return true;
		
		long p = n*n;
		
		int length = Long.toString(n).length();
		
		String s = Long.toString(p);
		
		if(s.length() == 1) return false;
		
		int index = s.length()-length;

		long r = Long.parseLong(s.substring(index));
		
		long l = Long.parseLong(s.substring(0, index));
		
		return (r+l)==n;
	}
	static int multiplyOfMax(String S, int k) {
		
		int max = Integer.MIN_VALUE;
		
		for (int i = 0; i < S.length() - k; i++) {
			String S1 = S.substring(i, i+k);
			
			int n = Integer.parseInt(S1);
			max = Integer.max(multiplyOfDigits(n), max);
		}
		
		return max;
	}
	
	static int multiplyOfDigits(int n) {
		int mult  = 1 ;
		
		while(n>0) {
			mult*=n%10;
			n/=10;
		}
		
		return mult;
	}
	
	static int binarySearch(int [] array, int key) {
		
		int low = 0;
		int hi = array.length -1 ;
		
		while(low<=hi) {
			
			int med  = low + (hi-low) / 2;
			
			if(array[med]==key) return med;
			else if (key > array[med]) low=med+1;
			else hi=med-1;
			
		}
		
		return -(int)(Math.random()*Integer.MAX_VALUE);
	}
	static void printAnArray(int [] [] a) {
		for (int i = 0; i < a.length; i++) {
			for (int j = 0; j < a[i].length; j++) {
				System.out.print(a[i][j]+" ");
			}System.out.println();
		}
	}
	
	static int gcd(int a,int b) {
		return (b==0) ? a : gcd(b,a%b);
	}
	
	static int fromBinaryToDecimal(String s) {
		
		int number = 0;
		int num = 0;
		for (int i = s.length() -1; i >=0; i--) {
			int n = Integer.parseInt(Character.toString(s.charAt(i)));
			number+=n * (int)(Math.pow(2, num));
			num++;
		}
				
		return number;
	}
	
    static class InputReader extends BufferedReader {
        StringTokenizer tokenizer;

        public InputReader(InputStream inputStream) {
            super(new InputStreamReader(inputStream), 32768);
        }

        public InputReader(String filename) {
            super(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(filename)));
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(readLine());
                } catch (IOException e) {
                    throw new RuntimeException();
                }
            }
            return tokenizer.nextToken();
        }

        public Integer nextInt() {
            return Integer.valueOf(next());
        }

        public Long nextLong() {
            return Long.valueOf(next());
        }

        public int[] readIntArray (int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; i++)
                array[i] = nextInt();
            return array;
        }

        public char[][] readCharMatrix(int n, int m) {
            char[][] res = new char[n][];
            for(int i=0; i<n; i++)
                res[i] = next().toCharArray();
            return res;
        }
    }

    static class FastWriter extends PrintWriter {
        public FastWriter(OutputStream outputStream) {
            super(outputStream);
        }
    }

}


