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.*;
import java.util.*;

public class Main {

    public static void main(String[] args) throws IOException{
        Reader.init(System.in);
        int n = Reader.nextInt();

        int low = (int) Math.ceil(n/4.0);
        int hi = 2*n/7;
        int bestFours = 0;
        int bestSevens = 0;

        for (int m = low; m <= hi; m++) {
            int curr4s = 2*n - 7*m;
            int curr7s = 4*m - n;
//            System.out.println(((curr4s + curr7s) - (bestFours + bestSevens)));
            if (m == low || (curr4s + curr7s < bestFours + bestSevens)){
                bestFours = curr4s;
                bestSevens = curr7s;
            }
            else if (curr4s + curr7s == bestFours + bestSevens){
                if (curr4s > bestFours){
                    bestFours = curr4s;
                    bestSevens = curr7s;
                }
            }
        }

        if (bestFours == 0 && bestSevens == 0) System.out.println(-1);
        else {
            StringBuilder ans = new StringBuilder();
            for (int i = 0; i < bestFours; i++) {
                ans.append("4");
            }
            for (int i = 0; i < bestSevens; i++) {
                ans.append("7");
            }
            System.out.println(ans);
        }
    }
}

/**
 * Reader class based on the article at "https://www.cpe.ku.ac.th/~jim/java-io.html"
 * */
class Reader{
    private static BufferedReader reader;
    private static StringTokenizer tokenizer;
    static void init(InputStream inputStream){
        reader = new BufferedReader(new InputStreamReader(inputStream));
        tokenizer = new StringTokenizer("");
    }
    static String next() throws IOException {
        String read;
        while (!tokenizer.hasMoreTokens()){
            read = reader.readLine();
            if (read == null || read.equals(""))
                return "-1";
            tokenizer = new StringTokenizer(read);
        }

        return tokenizer.nextToken();
    }
    static int nextInt() throws IOException{
        return Integer.parseInt(next());
    }

    static long nextLong() throws IOException{
        return Long.parseLong(next());
    }

    //Get a whole line.
//    static String line() throws IOException{
//        return reader.readLine();
//    }
//
//    static double nextDouble() throws IOException{return Double.parseDouble(next());}
}
