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
/**
 * Created by IntelliJ IDEA.
 * User: shakhov
 * Date: 15.06.2011
 * Time: 15:22:46
 * To change this template use File | Settings | File Templates.
 */

//6
//86 402 133 524 405 610   6 4 1

import java.io.*;
import java.util.*;

public class CodeForces {
	double eps = 0.00001;

	public void solve() throws IOException {
		 int n = nextInt();
         String ans = "-1";
         int x = 0, y = 0;
         if (n * 2 / 7 >= Math.floor(n / 4.0)) {
                 int c1 = 2 * n - 7 * (n * 2 / 7);
                 int c2 = -n + 4 * (n * 2 / 7);
                 StringBuilder sb = new StringBuilder();
                 if (c1 >= 0 && c2 >= 0) {
                         while (c1 > 0) {
                                 sb.append("4");
                                 c1--;
                         }
                         while (c2 > 0) {
                                 sb.append("7");
                                 c2--;
                         }
                         ans = sb.toString();
                 }
         }

         out.print(ans);
	}

	
	private BufferedReader reader;
	private StringTokenizer tokenizer;
	private String separator;
	public PrintWriter out;

	public static void main(String[] args) throws IOException {
		// new CodeForces().run(new FileReader("input.txt"), new
		// FileWriter("output.txt"));
		new CodeForces().run(new InputStreamReader(System.in), new OutputStreamWriter(System.out));
	}

	public void run(Reader reader, Writer writer) {
		try {
			this.reader = new BufferedReader(reader);
			out = new PrintWriter(writer);
			tokenizer = new StringTokenizer("");
			separator = System.getProperty("line.separator");
			separator = Character.toString(separator.charAt(separator.length() - 1));
			long t1 = System.currentTimeMillis();
			solve();
			out.flush();
			reader.close();
			writer.close();
			long t2 = System.currentTimeMillis();
			System.err.println("Time = " + (t2 - t1));
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(1);
		}
	}

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

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

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

	String nextToken() throws IOException {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			tokenizer = new StringTokenizer(reader.readLine());
		}
		return tokenizer.nextToken();
	}

}
