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