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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.io.BufferedReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Vikash Kumar
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        Codeforces solver = new Codeforces();
        solver.solve(1, in, out);
        out.close();
    }

    static class Codeforces {
        public void solve(int testNumber, InputReader in, OutputWriter out) throws IndexOutOfBoundsException {
            int n = in.ni();
            long a = 0, b = 0;
            boolean flag = false;
            for (int i = 0; i < n; i++) {
                long num = fun(i, n);
                if (num < 0) {
                    break;
                } else {
                    if ((num * 4 + i * 7) == n) {
                        flag = true;
                        a = num;
                        b = i;
                        //break;
                    }
                }
            }
            if (!flag) {
                out.println(-1);
            } else {
                //out.println(a + " " + b);
                int nn = (int) a / 7;
                for (int i = 0; i < (int) a % 7; i++) {
                    out.print(4);
                }
                for (int i = 0; i < 4 * nn + (int) b; i++) {
                    out.print(7);
                }
            }
        }

        long fun(int b, int n) {
            return ((long) n - (long) b * 7l) / 4l;
        }

    }

    static class InputReader {
        private BufferedReader br;
        private StringTokenizer st;

        public InputReader(InputStream inputStream) {
            br = new BufferedReader(new InputStreamReader(inputStream));
        }

        public String n() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                }
            }
            return st.nextToken();
        }

        public int ni() {
            return Integer.parseInt(n());
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void close() {
            writer.close();
        }

        public void print(int i) {
            writer.print(i);
        }

        public void println(int i) {
            writer.println(i);
        }

    }
}

