N=int(input())
ans=''
while N:
  if N%2==1:
    ans+='7'
    N-=3
  else:
    ans+='1'
    N-=2
print(ans)