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.util.*;

public class LuckySum109A
{
    public static void main(String[] args) 
    {
        // Set up scanner
        Scanner sc = new Scanner(System.in); 
        // System.out.println("Input n");
        int n = sc.nextInt();

        StringBuilder sb = new StringBuilder();
        int numsevens = 0;
        int numfours = 0;
        int originalnum = n;

        // If divisible by 7, take all sevens
        if (n % 7 == 0)
        {
            numsevens = n/7;
        }
        else   
        {
            // Subtract off 28s until < 18
            while (n >= 18)
            {
                n -= 28;
                numsevens += 4;
            }
            // Check the 8 good ones
            if (n == 4)
            {
                numfours++;
            }
            else if (n == 7)
            {
                numsevens++;
            }
            else if (n == 8)
            {
                numfours += 2;
            }
            else if (n == 11)
            {
                numsevens++;
                numfours++;
            }
            else if (n == 12)
            {
                numfours += 3;
            }
            else if (n == 14)
            {
                numsevens += 2;
            }
            else if (n == 15)
            {
                numfours += 2;
                numsevens++;
            }
            else if (n == 16)
            {
                numfours += 4;
            }
            else if (originalnum < 18) 
            {
                System.out.println(-1);
            }
            else  // Have to add 28 back and continue
            {
                n += 28;
                numsevens -= 4;
                while (n % 4 != 0 && n >=4)
                {
                    n -= 7;
                    numsevens++;
                }
                if (n<4)
                {
                    System.out.println(-1);
                    return;
                }
                else
                {
                    numfours = n/4;
                }
            }
        }

        for (int i=0; i<numfours; i++)
        {
            sb.append(4);
        }

        for (int i=0; i<numsevens; i++)
        {
            sb.append(7);
        }

        System.out.println(sb.toString());
    }
}

