n = int(raw_input()) a=1 if n==2: a=1 elif n%2==0: a.rjust(n/2-1, '1') else: a.rjust((n-1)/2-2,'1') a.rjust(1,'7') print a