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

public class Codeforces2 implements Runnable {

    private BufferedReader br = null;
    private PrintWriter pw = null;
    private StringTokenizer stk = new StringTokenizer("");

    public static void main(String[] args) {
        new Thread(new Codeforces2()).run();
    }

    public void run() {
        /*
         * try { br = new BufferedReader(new FileReader("input.txt")); pw = new PrintWriter("output.txt"); } catch (FileNotFoundException e) {
         * e.printStackTrace(); }
         */
        br = new BufferedReader(new InputStreamReader(System.in));
        pw = new PrintWriter(new OutputStreamWriter(System.out));
        solver();
        pw.close();

    }

    private void nline() {
        try {
            if (!stk.hasMoreTokens())
                stk = new StringTokenizer(br.readLine());
        } catch (IOException e) {
            throw new RuntimeException("KaVaBUnGO!!!", e);
        }
    }

    private String nstr() {
        while (!stk.hasMoreTokens())
            nline();
        return stk.nextToken();
    }

    private int ni() {
        return Integer.valueOf(nstr());
    }

    private long nl() {
        return Long.valueOf(nstr());
    }

    private double nd() {
        return Double.valueOf(nstr());
    }

    String nextLine() {
        try {
            return br.readLine();
        } catch (IOException e) {
        }
        return null;
    }

    class Point {
        int x, y;

        Point(int x, int y) {
            this.x = Math.min(x, y);
            this.y = Math.max(x, y);
        }

        boolean intersect(Point p) {
            if (this.x < p.x && p.x < this.y && this.y < p.y) {
                return true;
            }
            if (p.x < this.x && this.x < p.y && p.y < this.y) {
                return true;
            }
            return false;
        }
    }

    private void solver() {
        int n = ni();
        int k = n%7;
        int p = n/7;
        while(k%4!=0){
            k+=7;
            p--;
        }
        if(p<0 || k<0){
            pw.println(-1);
            exit();
        }
        for(int i=0; i<k/4; i++){
            pw.print(4);
        }
        for(int i=0; i<p; i++){
            pw.print(7);
        }
        
    }

    private BigInteger nbi() {
        return new BigInteger(nstr());
    }

    void exit() {
        pw.close();
        System.exit(0);
    }

}
