num = 0

n = int(input())
n2 = int(n/2)
if n == 3:
    print(7)
else:
    for i in range(n2):
        num = num * 10 + 1
    if n%2 != 0:
        num += 6 * 10 ** (n2 - 1)
    print(num)