Start: Apr, 17, 2017 10:00:00
Python程序设计基础培训第三次作业
End: Apr, 23, 2017 14:00:00
Time elapsed:
Time remaining:

Problem_ID: E
Result: Accepted
Time: 146ms
Memory: 21428kB
Author: 15606823587
In contest: 1087

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