n = int(raw_input())
ans = ""
while n > 3:
    ans += "1"
    n -= 2
if    n == 3: ans += "7"
elif n == 2: ans += "1"
print ans[::-1]