Start: Jul, 17, 2019 00:00:00
20190717Python程序设计基础培训第三次作业
End: Jul, 21, 2019 00:00:00
Time elapsed:
Time remaining:

Problem_ID: E
Result: Accepted
Time: 51ms
Memory: 25316kB
Author: shanzhenyu
In contest: 1295

n = int(input())
print(-1 if n%7%4 > n//7 else "4"*[0,2,4,6,1,3,5][n%7]+"7"*(n//7-n%7%4))