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 check {
    static boolean DEBUG_FLAG = false;
    int INF = (int)1e9;
    long MOD = 1000000007;
    
    static void debug(String s) {
        if(DEBUG_FLAG) {
            System.out.print(s);
        }
    }
    
    
    void solve(InputReader in, PrintWriter out) throws IOException {
        int n = in.nextInt();
        int q = n/4;
        int r = n%4;
        int x = -1, y = -1;
        if(r==0) {
            x = q;
            y = 0;
        } else if(r==1) {
            if(q>=5) {
                x = q-5;
                y = 3;
            }
        } else if(r==2) {
            if(q>=3) {
                x = q-3;
                y = 2;
            }
        } else {
            if(q>=1) {
                x = q-1;
                y = 1;
            }
        }
        if(x==-1 || y==-1) {
            out.println(-1);
        } else {
            while(x>=7) {
                x -= 7;
                y += 4;
            }
            for(int i=0; i<x; i++) {
                out.print("4");
            }
            for(int i=0; i<y; i++) {
                out.print("7");
            }
            out.println();
        }
    }
    
    
    public static void main(String[] args) throws IOException {
        if(args.length>0 && args[0].equalsIgnoreCase("d")) {
            DEBUG_FLAG = true;
        }
        InputReader in = new InputReader();
        PrintWriter out = new PrintWriter(System.out);
        int t = 1;//in.nextInt();
        long start = System.nanoTime();
        while(t-- >0) {
            new check().solve(in, out);
        }
        long end = System.nanoTime();
        debug("\nTime: " + (end-start)/1e6 + " \n\n");
        out.close();
    }
    
    static class InputReader {
        static BufferedReader br;
        static StringTokenizer st;
    
        public InputReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        
        String next() {
            while (st == null || !st.hasMoreTokens()) {
                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());
        }
    }
}