n = int(input())

n1 = 2
n7 = 3

str = ""
if n % 2 == 0:
    for i in range(n // 2):
        str += "1"
else:
    str = "7"
    for i in range((n - 3) // 2):
        str += "1"
print(int(str))