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: Taras_Brzezinsky
 * Date: 8/29/11
 * Time: 6:02 PM
 * To change this template use File | Settings | File Templates.
 */

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.StringTokenizer;

public class TaskA extends Thread {
    public TaskA() {
        this.input = new BufferedReader(new InputStreamReader(System.in));
        this.output = new PrintWriter(System.out);
        this.setPriority(Thread.MAX_PRIORITY);
    }

    static class State  implements  Comparable<State>{
        int numSeven, numFour;
        public State(int numFour, int numSeven) {
            this.numFour = numFour;
            this.numSeven = numSeven;
        }

        public int compareTo(TaskA.State o) {
            int sum = numSeven + numFour, otherSum = o.numFour + o.numSeven;
            if (sum == otherSum) {
                return o.numFour - this.numFour;
            } else {
                return sum - otherSum;
            }
        }
    }

    private void solve() throws Throwable {
        int n = nextInt();
        ArrayList<State> states = new ArrayList<State>();
        for (int four = 0; four * 4 <= n; ++four) {
            if ((n - four * 4) % 7 == 0) {
                states.add(new State(four, (n - four * 4) / 7));
            }
        }
        Collections.sort(states);
        if (states.isEmpty()) {
            output.println(-1);
        } else {
            State current = states.get(0);
            for (int i = 0; i < current.numFour; ++i) {
                output.print(4);
            }
            for (int i = 0; i < current.numSeven; ++i) {
                output.print(7);
            }
        }



    }

    public void run() {
        try {
            solve();
        } catch (Throwable e) {
            System.err.println(e.getMessage());
            e.printStackTrace();
            System.exit(666);
        } finally {
            output.flush();
            output.close();
        }
    }

    public static void main(String[] args) {
        new TaskA().start();
    }

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

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

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

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

    private BufferedReader input;
    private PrintWriter output;
    private StringTokenizer tokens = null;
}
