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

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