N = int(raw_input())
use = ((N / 2) - 1)
ans = "1" * use
remain = N - use * 2
if remain == 3:
    ans = "7" + ans
else:
    ans = "1" + ans

print ans