n=int(input())
l=[]
if n%2:
  l.append(7)
  n-=3
  l.extend([1]*(n//2))
else:
  l.extend([1]*(n//2))
print("".join(map(str,sorted(l)[::-1])))