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: 105ms
Memory: 24436kB
Author: yiye
In contest: 1123

s=int(input())
for i in range(s//7,-1,-1):
    if (s-7*i)%4==0 :
        print("4"*((s-7*i)//4)+"7"*i)
        break;
if i==0 and (s-7*i)%4!=0:
    print(-1)