n=int(input()) if n==2: print(1) elif n==3: print(7) else: a=n%2 n=n-a m=int(n/2) print(int("1"*m+"7"*a))