n=int(input()) res="" if n>=4: if n%2==1: res+="7" n-=3 res+="1"*(n//2) print(res) elif n==3: print(7) elif n==2: print(1)