Petya loves lucky numbers. We all know that lucky numbers are the positive integers whose decimal representations contain only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.

Petya wonders eagerly what minimum lucky number has the sum of digits equal to n. Help him cope with the task.

Input

The single line contains an integer n (1 ≤ n ≤ 106) — the sum of digits of the required lucky number.

Output

Print on the single line the result — the minimum lucky number, whose sum of digits equals n. If such number does not exist, print -1.

Examples

Input

11


Output

47


Input

10


Output

-1
import java.util.*;
import java.math.*;
import java.io.*;
import java.text.*;

public class A{
	
static class Node implements Comparable<Node> {
	String s;
	long sum;
	public Node(String s,long sum) {
		this.s=s;
		this.sum=sum;
		
		
	}
	public int compareTo(Node c) {
	   int i= Long.compare(this.sum, c.sum);
	   if(i!=0)return i;
	   i=this.s.length()-c.s.length();
	   if(i!=0) return i;
	   i=this.s.compareTo(c.s);
	   return i;
	}
}
//public static PrintWriter pw; 
public static PrintWriter pw=new PrintWriter(System.out);
public static void solve() throws IOException{
//	pw=new PrintWriter(new FileWriter("C:\\Users\\shree\\Downloads\\small_output_in"));
	FastReader sc=new FastReader();
	long n=sc.nextLong();
	long mn=Long.MAX_VALUE;
	StringBuilder ans=new StringBuilder("");
	for(long n2=n/7;n2>=0;n2--) {
		if((n-7*n2)%4==0) {
			long n1=(n-7*n2)/4;
			if(n1+n2<mn) {
				mn=n1+n2;
				StringBuilder sb=new StringBuilder("");
			for(long i=1;i<=n1;i++)sb.append(4);
			for(long i=1;i<=n2;i++) sb.append(7);
			ans=sb;
			
			}
		}
	}
	if(ans.length()>0)pw.println(ans);
	else 
	pw.println(-1);
	pw.close();
	
}
static void print(long n) {
	String s=Long.toBinaryString(n);
	for(int i=0;i<s.length();i++) if(s.charAt(i)=='1')pw.print(7);else pw.print(4);
}
public static void main(String[] args)  {
    new Thread(null ,new Runnable(){
      public void run(){
          try{
          
              solve();
          } catch(Exception e){
              e.printStackTrace();
          }
      }
  },"1",1<<26).start();
 
}
static long modPow(long x,long y,long M){
	if(y==0) return 1;
	if(y%2==0) return modPow((x*x)%M,y/2,M)%M;
	else return (x*modPow((x*x)%M,(y-1)/2,M))%M;
}

static long M=(long)Math.pow(10,9)+7;
 
	static class FastReader {
        BufferedReader br;
        StringTokenizer st;
 
        public FastReader() throws FileNotFoundException{
            //br=new BufferedReader(new FileReader("C:\\Users\\shree\\Downloads\\B-small-practice.in"));	
        	 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;
        }
     }
}