a=int(input()) on=a//2 out="" for i in range(on): if a%3==0 and i==on-1: out=out+"7" else: out=out+"1" print(out)