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
//package codeforces;
import java.io.*;
import java.util.*;
public final class Codeforces {
    public static void main(String[] args) throws Exception{
        BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(java.io.FileDescriptor.out), "ASCII"), 512);        
        FastReader sc = new FastReader();
          //int tc=sc.nextInt();
           int n=sc.nextInt();
           int a=-1,b=-1,c=-1,d=-1;
           int i=0;
           while(4*i<=n)
           {
               if((n-4*i)%7==0){a=i;b=(n-4*i)/7;break;}
               i++;
           }
           i=0;
           while(7*i<=n)
           {
               if((n-7*i)%4==0){c=i;d=(n-7*i)/4;break;}
               i++;
           }
           if(a!=-1&&b!=-1&&c!=-1&&d!=-1)
           {
               if(a+b<=c+d)
               {
                   for(int j=0;j<a;j++)out.write("4");
                   for(int j=0;j<b;j++)out.write("7");
               }
               else
               {
                   for(int j=0;j<c;j++)out.write("7");
                   for(int j=0;j<d;j++)out.write("4");
               }
           }
           
           else if(a!=-1&&b!=-1)
           {
                for(int j=0;j<a;j++)out.write("4");
                for(int j=0;j<b;j++)out.write("7"); 
           }
           else if(c!=-1&&d!=-1)
           {
                 for(int j=0;j<c;j++)out.write("7");
                 for(int j=0;j<d;j++)out.write("4");  
               
           }
           else out.write("-1");
        // System.out.println("a b c d "+a+" "+b+" "+c+" "+d);
           out.flush();
        }

   
    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;            
        }        
    }   
    
    
    ///////////////////////////////////////////////////////////////////////////////////////////////////////// 
}
