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.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;

public class Main {

    private int sum(String s) {
        int jum = 0;
        for (int x = 0 ; x < s.length(); x++) {
            jum += Integer.parseInt(Character.toString(s.charAt(x)));
        }
        return jum;
    }

    long result = 0;

   

    private void solve() throws IOException {
        int res = nextInt();
        int jum = 0;
        String s = "";
        while (sum(s) < res) {
            if ((res - sum(s)) % 7 != 0) {
                s += "4";
            } else {
                long x = res - sum(s);
                x /= 7;
                out.print(s);
                for (long y = 0; y < x;y++) {
                    out.print("7");
                }
                out.println();
                return;
            }
        }
        
        out.println((sum(s) == res)?s:-1);
    }

    public static void main(String[] args) {

        try {
            br = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
            new Main().solve();
            out.close();
        } catch (Throwable e) {
            e.printStackTrace();
            System.exit(239);
        }
    }
    static BufferedReader br;
    static StringTokenizer st;
    static PrintWriter out;

    static String nextToken() throws IOException {
        while (st == null || !st.hasMoreTokens()) {
            String line = br.readLine();
            if (line == null) {
                return null;
            }
            st = new StringTokenizer(line);
        }
        return st.nextToken();
    }

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

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

    static double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    static int[] nextIntArray(int n) throws IOException {
        int[] temp = new int[n];
        for (int x = 0; x < n; x++) {
            temp[x] = nextInt();
        }
        return temp;
    }

    static long[] nextLongArray(int n) throws IOException {
        long[] temp = new long[n];
        for (int x = 0; x < n; x++) {
            temp[x] = nextLong();
        }
        return temp;
    }

    static String[] nextArray(int n) throws IOException {
        String[] temp = new String[n];
        for (int x = 0; x < n; x++) {
            temp[x] = nextToken();
        }
        return temp;
    }

    static <T> void debug(T x) {
        System.out.println("debug x: " + x.toString());
    }

    static void debugInt(int[] x) {
        for (int a = 0; a < x.length; a++) {
            System.out.println("debug array no: " + a + " value: " + x[a]);
        }
    }

    static void debugArray(String[] x) {
        for (int a = 0; a < x.length; a++) {
            System.out.println("debug array no: " + a + " value: " + x[a]);
        }
    }
}
