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.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.StreamTokenizer;
import java.util.ArrayList;
import java.util.Scanner;

public class Main {
    /////////////////////////////////////////////////////////////////
    // IO
    /////////////////////////////////////////////////////////////////
    private static StreamTokenizer in;
    private static PrintWriter out;
    private static BufferedReader inB;
    
    private static int nextInt() throws Exception{
        in.nextToken();
        return (int)in.nval;
    }
    
    private static String nextString() throws Exception{
        in.nextToken();
        return in.sval;
    }
    
    static{
        out = new PrintWriter(System.out);
        inB = new BufferedReader(new InputStreamReader(System.in));
        in = new StreamTokenizer(inB);
    }
    /////////////////////////////////////////////////////////////////
    
    
    
    public static void main(String[] args)throws Exception {
        int n = nextInt();
        
        int min4 = INF, min7 = INF;
        
        for(int i = 0; i<=n/4; i++) {
            int j = (n - i*4);
            if(j%7 != 0)continue;
            j /= 7;
                
            if(min4 == INF || (min4 + min7) >= (i+j)) {
                if((min4 + min7) == (i+j)) {
                    if(i < min4) {
                        min4 = i;
                        min7 = j;
                    }
                    continue;
                }
                min4 = i;
                min7 = j;
            }
                
        }
        
        if(min4 == INF) {
            exit(-1);
        }
        
        for(int i= 0; i<min4; i++) {
            out.print('4');
        }
        for(int i= 0; i<min7; i++) {
            out.print('7');
        }
        out.flush();
    }
    
    
    /////////////////////////////////////////////////////////////////
    // pre - written
    /////////////////////////////////////////////////////////////////
    private static void println(Object o) throws Exception {
        out.println(o);
        out.flush();
    }
    private static void exit(Object o) throws Exception {
        println(o);
        exit();
    }
    private static void exit() {
        System.exit(0);
    }
    private static final int  INF = Integer.MAX_VALUE;
    private static final int MINF = Integer.MIN_VALUE;
    //////////////////////////////////////////////////////////////////
}
