import sys
input=lambda: sys.stdin.readline().rstrip()
n=int(input())
if n%2==0:
  print(int("1"*(n//2)))
else:
  print(int("7"+"1"*((n-3)//2)))