n=int(input()) ans='' if n%2!=0: n-=3 ans+='7' while n>=2: n-=2 ans+='1' print(ans)