n = int(input())
sev = 0
if n % 2 == 1 and n >= 3:
    sev += 1
    n -= 3

q = n // 4
m = n % 4
one = 0
if m == 2:
    one += 1

print("7" * sev + q * 2 * "1" + one * "1")