Codeforces Beta Round 84 (Div. 1 Only)
A
Lucky Sum of Digits
Codeforces
1000
原题
←B →
翻译中…

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* ≤ 10^{6}$) — 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.

翻译中…

样例

Input #1
11
Output #1
47
InputCopy OutputCopy
Input #2
10
Output #2
-1
InputCopy OutputCopy
题目信息
题号
109A
时间限制
2 s
内存限制
256 MB
标签
暴力
模拟

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。