n=int(input()) if n==0 or n==1: print(0) else: if n%2==0: print("1"*int((n/2))) else: s="1"*int((n-3)/2) print("7"+s)