N = int(input()) s = "1" if N%2==0 else "7" s += "1" * ((N // 2) - 1) print(s)