Start: Nov, 12, 2017 10:00:00
2017秋Python程序设计基础培训第三次作业
End: Nov, 19, 2017 12:00:00
Time elapsed:
Time remaining:

Problem_ID: E
Result: Accepted
Time: 78ms
Memory: 24436kB
Author: lifeiying
In contest: 1123

t=0
n=int(input())
for i in range(n//7,-1,-1):
    if(n-i*7)%4==0:
        t=1
        break
if t==1:
    print("4"*((n-i*7)//4)+"7"*i)
else:
    print("-1")