n=int(input())

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